The following pages provide detailed information on the properties and methods for the various classes that implement Ethernet networking communications.
The networking classes include: a IPEndPoint Class for specifying IP and port addresses; a Socket Class that is the basis for most networking I/O operations and contains the basic send and receive methods; a TcpListener Class that is used for implementing TCP server applications; a TcpClient Class for implementing TCP client applications; and finally a UdpClient Class for implementing both the server and client side of UDP based communications.
The tables below summarize the properties and methods for each Class, which are described in greater detail in the following sections.
IPEndPoint Member | Type | Description |
---|---|---|
Constructor Method |
Creates an Endpoint and allows the IP Address and Port to be specified. |
|
Property |
Sets or gets the IP Address of an Endpoint. |
|
Property |
Sets or gets the Port of an Endpoint. |
Socket Member | Type | Description |
---|---|---|
Property |
Gets the number of data bytes currently available to receive from a Socket. |
|
Property |
Sets or gets the blocking mode for a Socket. If True, the Socket blocks. If False, it does not block. |
|
Method |
Closes any connections associated with a Socket. |
|
Method |
Requests a TCP Client connection with a remote TCP Server. |
|
Property |
Sets or gets the flag that controls whether a keep-alive message is automatically transmitted over the current TCP connection. |
|
Method |
Receives a datagram from an open TCP connection. |
|
Method |
Receives a datagram from an open UDP connection. |
|
Property |
Sets or gets the receive timeout, in milliseconds, for a Socket. |
|
Property |
Gets information about the remote end point of a TCP connection. |
|
Method |
Sends a datagram on an open TCP connection. |
|
Property |
Sets or gets the send timeout, in milliseconds, for a Socket. |
|
Method |
Sends a datagram to an open UDP connection. |
TcpClient Member | Type | Description |
---|---|---|
Constructor Method |
Creates an Object for a TCP Client and optionally requests a connection. |
|
Method |
Returns the embedded Socket for performing I/O. |
|
Method |
Closes a Client Socket and breaks any connection. |
TcpListener Member | Type | Description |
---|---|---|
Constructor Method |
Creates an Object for a TCP Server to listen for connections. |
|
Method |
Accepts a connection and returns a new Socket Object for use by the TCP Server. |
|
Method |
Stops listening and closes the listener Socket. |
|
Property |
True if there is a pending connection and AcceptSocket will succeed. Otherwise False. |
|
Method |
Starts listening for connection requests. |
|
Method |
Stops listening and closes the listener Socket. Same as Close method. |
UdpClient Member | Type | Description |
---|---|---|
Constructor Method |
Creates an Object for I/O using UDP. |
|
Method |
Returns the embedded Socket for performing I/O. |
|
Method |
Closes a Socket. |