Module: sockets

Classes

Accept

Returns a (conn, addr) tuple when the operation completes.

Connect

Connect to the given addr using sock.

Operation

Read

len is max read size, BUT, if if there are buffers from ReadLine return them first. Example usage:

ReadAll

Run this operator till we've read len bytes.

ReadLine

Run this operator till we read a newline (n) or we have a overflow.

SendFile

Uses underling OS sendfile call or a regular memory copy operation if there is no sendfile. You can use this as a WriteAll if you specify the length. Usage:

Socket

Write

Write the buffer to the socket and return the number of bytes written.

WriteAll

Run this operation till all the bytes have been written.