An class to simplify a TCP/IP client-side socket.
More...
|
| | Tcp_Client () |
| | Constructor for the Tcp_Client. More...
|
| |
| void | Open (Socket ClientSocket, EndPoint RemoteEndpoint) |
| | Open a TCP/IP client object from a Socket accepted from the TCP/IP Server Object More...
|
| |
| int | Open6 (string sHost, int iPort) |
| | Connect to a TCP/IPv6 Server. (Blocked Call, may take up to 30 seconds to complete) More...
|
| |
| int | Open (string sHost, int iPort) |
| | Connect to a TCP/IPv4 Server. (Blocked Call, may take up to 30 seconds to complete) More...
|
| |
| int | Open (string sHost, int iPort, int iTimeoutMs) |
| | Connect to a TCP/IPv4 Server. (Blocked version with timeout) More...
|
| |
| int | Open6 (string sHost, int iPort, int iTimeoutMs) |
| | Connect to a TCP/IPv6 Server. (Blocked version with timeout) More...
|
| |
| bool | IsOpen () |
| | Tests to see if the socket is writeable. More...
|
| |
| int | Close () |
| | Close the TCP/IP connection. More...
|
| |
| int | Receive (byte[] byary, int i32Timeout_Ms) |
| | Receive data from the TCP/IP connection. More...
|
| |
| int | Receive (byte[] byary, int iOffset, int iMaxSize, int i32Timeout_Ms) |
| | Receive data from the TCP/IP connection and store to a particular section of the byte array. More...
|
| |
| int | Send (byte[] byary, int i32Tx_Length) |
| | Send data to TCP/IP remote host. More...
|
| |
An class to simplify a TCP/IP client-side socket.
| ip4.Tcp_Client.Tcp_Client |
( |
| ) |
|
| int ip4.Tcp_Client.Close |
( |
| ) |
|
Close the TCP/IP connection.
- Returns
- -1 if a fault occured. The object is still closed if -1 returns. Check strLastFault for message.
| bool ip4.Tcp_Client.IsOpen |
( |
| ) |
|
Tests to see if the socket is writeable.
Valid half-open TCP sockets will appear writeable. This function only tests to see if the socket appears if data may be sent and after the "connect" has been validated and completed.
- Returns
- True if the socket is open and appears writeable. False otherwise.
| void ip4.Tcp_Client.Open |
( |
Socket |
ClientSocket, |
|
|
EndPoint |
RemoteEndpoint |
|
) |
| |
Open a TCP/IP client object from a Socket accepted from the TCP/IP Server Object
- Parameters
-
| ClientSocket | The accepted TCP/IP socket returned from Tcp_Server.Accept() |
| RemoteEndpoint | An endpoint structure from the Accept method. |
| int ip4.Tcp_Client.Open |
( |
string |
sHost, |
|
|
int |
iPort |
|
) |
| |
Connect to a TCP/IPv4 Server. (Blocked Call, may take up to 30 seconds to complete)
- Parameters
-
| sHost | Host name in name or dot IP Address format. |
| iPort | TCP/IP server port to connect too. |
- Returns
- 0 indicates success, -1 indicates failure
| int ip4.Tcp_Client.Open |
( |
string |
sHost, |
|
|
int |
iPort, |
|
|
int |
iTimeoutMs |
|
) |
| |
Connect to a TCP/IPv4 Server. (Blocked version with timeout)
- Parameters
-
| sHost | Host name in name or dot IP Address format. |
| iPort | TCP/IP server port to connect too. |
| iTimeoutMs | Timeout is Milliseconds to wait for the connection to complete. |
- Returns
- 0 indicates success, -1 indicates failure
| int ip4.Tcp_Client.Open6 |
( |
string |
sHost, |
|
|
int |
iPort |
|
) |
| |
Connect to a TCP/IPv6 Server. (Blocked Call, may take up to 30 seconds to complete)
- Parameters
-
| sHost | IPV6 Host name in name or colon address format. |
| iPort | TCP/IP server port to connect too. |
- Returns
- 0 indicates success, -1 indicates failure
| int ip4.Tcp_Client.Open6 |
( |
string |
sHost, |
|
|
int |
iPort, |
|
|
int |
iTimeoutMs |
|
) |
| |
Connect to a TCP/IPv6 Server. (Blocked version with timeout)
- Parameters
-
| sHost | Host name in name or dot IP Address format. |
| iPort | TCP/IP server port to connect too. |
| iTimeoutMs | Timeout is Milliseconds to wait for the connection to complete. |
- Returns
- 0 indicates success, -1 indicates failure
| int ip4.Tcp_Client.Receive |
( |
byte[] |
byary, |
|
|
int |
i32Timeout_Ms |
|
) |
| |
Receive data from the TCP/IP connection.
- Parameters
-
| byary | Byte array to store the received data. |
| i32Timeout_Ms | Timeout interval in milliseconds. |
- Returns
- Positive values for data received, zero for timeout. When receiving a negative value, close the socket.
| int ip4.Tcp_Client.Receive |
( |
byte[] |
byary, |
|
|
int |
iOffset, |
|
|
int |
iMaxSize, |
|
|
int |
i32Timeout_Ms |
|
) |
| |
Receive data from the TCP/IP connection and store to a particular section of the byte array.
- Parameters
-
| byary | Byte array to store the received data. |
| iOffset | Offset in the buffer to begin receiving data. |
| iMaxSize | The maximum receive size to byary. Allows receives smaller than byary. |
| i32Timeout_Ms | Timeout interval in milliseconds. |
- Returns
- Positive values for data received, zero for timeout. When receiving a negative value, close the socket.
| int ip4.Tcp_Client.Send |
( |
byte[] |
byary, |
|
|
int |
i32Tx_Length |
|
) |
| |
Send data to TCP/IP remote host.
- Parameters
-
| byary | Bytes to send. Should at least be i32Tx_Length. |
| i32Tx_Length | Number of bytes to send. |
- Returns
- 0 indicates success, if -1 returned, close the TCP/IP connection.
| string ip4.Tcp_Client.strError = "" |
Last Exception Thrown (when -1 is returned).
The documentation for this class was generated from the following file: