Represents a single client IP address.
When a connection is opened between a client IP and a NetServer object, a new NetClient object will be created for the client's IP address if one does not already exist. All ClientSocket connections to that IP address are then tracked under the single NetClient object.
NetClient objects are intended to be created from the network interfacing code exclusively.
The NetClient class consists of the following fields:
Access | Name | Type | Comment |
|---|---|---|---|
| ClientData | APTR | A custom pointer available for userspace. | |
| Connections | *ClientSocket | Pointer to the first established socket connection for the client IP. | |
| IP | struct IPAddress * | The IP address of the client. | |
| Next | *NetClient | The next client IP with connections to the NetServer. | |
| Prev | *NetClient | The previous client IP with connections to the NetServer. | |
| TotalConnections | INT | The total number of current socket connections for the IP address. |
Address types for the IPAddress structure.
| Name | Description |
|---|---|
| IPADDR::V4 | |
| IPADDR::V6 |
| Field | Type | Description |
|---|---|---|
| Data | INT | 128-bit array for supporting both V4 (32-bit host order) and V6 (8-bit byte order) IP addresses. |
| Type | IPADDR | Identifies the address Data value as a V4 or V6 address type. |
| Port | INT | For UDP packets, identifies the client port number in host byte order. |