Open Socket with SocketType.Raw

  • Thread starter Thread starter =?iso-8859-15?Q?Stefan_P=FChringer?=
  • Start date Start date
?

=?iso-8859-15?Q?Stefan_P=FChringer?=

I've found source code how to receive all incoming packets in a program
for the standard framework.

Now I wanted to try to make it work at the compact framework.

But I at the Socket creation I get the first exception
socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw,
ProtocolType.IP );

If I start the program I get the following exception (in German):

"Eine nicht behandelte Ausnahme des Typs
'System.Net.Sockets.SocketException' ist in System.dll aufgetreten.
Zusätzliche Informationen: Diese Adressengruppe bietet keine Unterstützung
für den angegebenen Sockettyp"

The code throws a Syste.Net.Sockets.SocketException with the additional
information that the AddressFamily has no support for the given
SocketType. I've looked up in the SDK-Documentation and at both, at
AddressFamily.InterNetwork and SocketType.Raw, there's explicity remaked
that they are supported by the compact framework.

Why doesn't it work then?

Any suggestions?

Thx a lot!

Stefan
 
Raw sockets are not supported in the Windows CE environment. Although the
values for those parameters are supported by the .NET CF, when there's no
underlying support for the socket type from the provider, it can't make them
available.

Paul T.
 
Back
Top