List of functions in sockets.inc

Function Description
socket_open
Opens a new connection to hostname:port via protocol (either SOCKET_TCP or SOCKET_UDP),
returns a socket (positive) or negative or zero on error.
States of error:
0 - no error
1 - error while creating socket
2 - couldn't resolve hostname
3 - couldn't connect to given hostname:port
socket_close
Closes a Socket
socket_recv
Recieves Data to string with the given length
socket_send
Sends data to the Socket
socket_send2
Same as socket_send but Data can contain null bytes
socket_change
This function will return true if the state (buffer content) have changed within the last recieve or
the timeout, where timeout is a value in µSeconds, (1 sec =1000000 µsec).
Use to check if new data is in your socket.