Base interface for read/write operations on FIFOs and Unix Sockets.
Methods
read(buffer:Bytes, length:Int):Int
Reads up to length bytes from the communicator into the provided buffer.
Parameters:
buffer | The buffer to read into. |
|---|---|
length | The maximum number of bytes to read. |
Returns:
The number of bytes actually read, or -1 on error.
setBlocking(blocking:Bool):Bool
Toggles non-blocking mode for the communicator.
Parameters:
blocking | True to enable blocking (default), false for non-blocking. |
|---|
Returns:
True if successful.
write(buffer:Bytes, length:Int):Int
Writes length bytes from the buffer to the communicator.
Parameters:
buffer | The buffer containing data to write. |
|---|---|
length | The number of bytes to write. |
Returns:
The number of bytes actually written, or -1 on error.