| -- Method ------------------------- | -- Behavior ---------- |
|---|---|
| Bind([LocalPort],[LocalIP]) | bind control to a specific IP address and port |
| Listen() | request socket server listen for connection requests |
| Accept(requestID as Long) | accept an incoming connection |
| Close() | close a TCP connection |
| Connect([RemoteHost],[RemotePort]) | request a connection |
| GetData(data,[type],[maxlen]) | retrieve a block of data from the socket buffer |
| SendData(data) | send a block of bytes to a connected socket (TCP) |
| PeekData(data,[type],[maxlen]) | look at data in receive buffer without extracting |
| -- Property -------------------------- | -- Description ---------- |
|---|---|
| BytesReceived | number of bytes in the Receive Buffer |
| LocalHostName | local machine name |
| LocalIP | IP address of local machine |
| LocalPort | port to use while sending or receiving |
| Protocol | transmission protocol (TCP or UDP) |
| RemoteHostIP | IP address of remote machine |
| SocketHandle | current socket handle, used with API functions |
| State | current state of control |
| -- Event ----------------------------- | -- Description ---------- |
|---|---|
| ConnectionRequest | client requests connection with server |
| Connect | connection is established |
| Close | connection is closed |
| DataArrival | data received |
| SendProgress | data is being sent |
| SendComplete | data transmission completed |
| Error | transmission error occurred |