This control uses infrared to provide two-way communication between a Windows CE-based device and a main computer. The Winsock control uses the IrDA protocol to provide this capability.
WinSockCtl
Mscewinsock.dll
The Winsock control supports the following properties:
BytesReceived | RemoteHost |
LocalHostName | RemoteHostIP |
LocalIP | RemotePort |
LocalPort | SocketHandle |
Name | State |
Parent | ServiceName |
Protocol |
The Winsock control supports the following methods:
Accept | GetData |
Close (Winsock) | Listen |
Connect | SendData |
The Winsock control supports the following events:
Close | Error |
ConnectionRequest | SendComplete |
DataArrival | SendProgress |
The Winsock control is invisible to the user.
If you are creating a client application, set the RemoteHost property and the RemotePort property first, then invoke the Connect method.
If you are creating a server application, set the LocalPort property, then invoke the Listen method. When the client computer requests a connection, the ConnectionRequest event occurs. To complete the connection, invoke the Accept method within the ConnectionRequest event.
Once a connection has been made, either the client computer or the server computer can send and receive data. To send data, invoke the SendData method. Whenever data is received, the DataArrival event occurs. Invoke the GetData method within the DataArrival event to retrieve the data.