Use a plugin and wrap the functions sock, send, and recv.
These are the prototypes:
SCAR Code:
function socket(a, b, c: Integer): Integer; //socket handle
//handle = socket(PF_INET, SOCK_STREAM, 0);
function recv(socket: Integer; Buf: PChar; Len, Someint: Integer): Integer; //number of bytes recieved.
function send(socket: Integer; Buf: PChar; Len, SomeInt: Integer): Integer; //number of bytes sent. SomeInt, in both functions, is usually zero.
If you're lucky, you can import them as an API from winsock.dll.