TCP Socket Example

As of 2.6.0, Soldat Server Scripts are now able to establish TCP Connections.

''' NOTE: These features are only enabled when Safe Mode is turned off! Start the server with -safe 0 to disable Safe Mode. '''

Socket Related Functions:  - ConnectSocket Use this function to create the socket and connect it. - CloseSocket Disconnect a socket created with CreateSocket and destroy from memory. - SendData Send a string to a socket. - ReadLnSocket Read a line from a socket to a variable (Line end character is 0A (chr(10))

For your convenience, I have provided a basic example of how to put all these functions into practice.

SocketExample.pas: