Interface TCPSocket
access this type via: net.TCPSocket (provides, requires or uses)
--- extends:Stream
Communicate over the TCP network protocol. New connections can be established either using 'connect' (for a client) or by using 'accept' (for a server, in conjunction with a TCPServerSocket instance).
Functions
bool connect(char address[], int port)
bool accept(TCPServerSocket server)
void disconnect()
NetworkEndpoint getRemoteEndpoint()
NetworkEndpoint getLocalEndpoint()
bool connect(char address[], int port)
Connect to the given TCP server.
bool accept(TCPServerSocket server)
Establish a TCP connection by accepting a new client via a TCP server socket.
void disconnect()
Disconnect (terminate) this TCP connection.
NetworkEndpoint getRemoteEndpoint()
Get the endpoint details of the remote end of this TCP connection.
NetworkEndpoint getLocalEndpoint()
Get the endpoint details of the local end of this TCP connection.