Share via


Socket Programming

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The following items pertain to programming sockets in the .NET Compact Framework. For information about using .NET Framework sockets, see Sockets.

  • Not all socket options are supported on all device operating systems.

    The .NET Compact Framework is designed to be able to be ported to any number of operating systems, each with its own level of functionality. Therefore, the .NET Compact Framework does not artificially limit the availability of socket options based on any particular level of support of an operating system.

  • Raw sockets are not supported.

  • There are known issues with sockets on Pocket PCs running Windows CE 3.0.

    If you close a socket with unsent data from a previous Send call, the data will be lost or corrupted.

    If you accept a socket and then close the bound socket before closing the accepted socket, you cannot bind to that port until the timeout, which is about 4.5 minutes, has elapsed.

  • In .NET Compact Framework applications, the following options are supported but do not work without TCP/IP stack modification and are currently reserved for future use: AcceptConnection, ReceiveLowWater, ReceiveTimeout, SendLowWater, SendTimeout, and Type.

  • The ReceiveBuffer enumeration member is supported only for sockets of the Windows CE Winsock type SOCK_DGRAM, which are datagram-oriented sockets. The default receive buffer size is 32768 bytes and cannot be set with ReceiveBuffer.

See Also

Tasks

How to: Create a Socket Listener