ReCTs TCP Networking has 3 Datatypes.
They are all in one Article because they are more or less connected.
The TCP Client Datatype holds a Networking Client.
To create one, you will need to open a connection:var someClient <- ConnectTCPClient("IP", 1234);
The TCP Client Datatype has 6 built in Functions:
Writes the given text to the SendBuffer and flushes it.
Writes the given line to the SendBuffer and flushes it.
Reads whatever is inside the ReceiveBuffer.
Reads one line of the ReceiveBuffer, if there is none then wait.
Will Close the connection.
Will check if the Client is connected and returns the result as a bool.
The TCP Listener Datatype holds a Networking Server-Side Listener.
To create one, you will need to start listening on a Port:var someListener <- ListenOnTCPPort(1234);
The TCP Listener Datatype has only 1 built in Function:
Will wait for a Client to Connect and then return a Socket.
The TCP Socket Datatype holds a Networking Server-Side Socket.
To create one, you will need to accept a Client connection:var someSocket <- someListener >> OpenSocket();
The TCP Socket has the same functions as the TCP Client.