Accept a new connected client. This will return a connected socket on which you can read/write some data.
Bind the socket to the given host/port so it can afterwards listen for connections there.
Closes the socket : make sure to properly close all your sockets or you will crash when you run out of file descriptors.
Connect to the given server host/port. Throw an exception in case we couldn't successfully connect.
Return the information about our side of a connected socket.
Allow the socket to listen for incoming questions. The parameter tells how many pending connections we can have until they get refused. Use accept() to accept incoming connections.
Return the information about the other side of a connected socket.
Available on python, lua, cs
Read the whole data available on the socket.
Change the blocking mode of the socket. A blocking socket is the default behavior. A non-blocking socket will abort blocking operations immediately by throwing a haxe.io.Error.Blocked value.
Allows the socket to immediately send the data when written to its output : this will cause less ping but might increase the number of packets / data size, especially when doing a lot of small writes.
Available on python, lua, cs
Gives a timeout after which blocking socket operations (such as reading and writing) will abort and throw an exception.
Shutdown the socket, either for reading or writing.
Block until some data is available for read on the socket.
Available on python, lua, cs
Write the whole data to the socket output.