All Bundles
Pipe
Named pipe support. For POSIX, a file backed UNIX socket. For Windows, a named pipe object.
Implements: InputStream, OutputStream
Operations
New
Create a new pipe for either a client or server
New(name:String, mode:Pipe->Mode)
Parameters
Name | Type | Description |
---|
name | String | pipe path and name. For POSIX the base direcotry is /tmp/ for Windows \\.\pipe\ |
mode | Pipe->Mode | Mode->OPEN for existing pipe or Mode->CREATE to create a new pipe |
Close
Closes the stream
method : public : Close() ~ Nil
Connect
Wait for client connection
method : public : Connect() ~ Bool
Return
Type | Description |
---|
Bool | true when connected |
GetName
Gets the pipe name
method : public : GetName() ~ String
Return
Type | Description |
---|
String | pipe name |
IsOpen
Returns rather the pipe is open
method : public : IsOpen() ~ Bool
Return
Type | Description |
---|
Bool | true if pipe is open, false otherwise |
ReadBuffer
Reads bytes into a byte buffer
method : public : ReadBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
Name | Type | Description |
---|
offset | Int | destination buffer offset |
num | Int | number of values to read |
buffer | Byte[] | input buffer |
Return
Type | Description |
---|
Int | number of values read |
Reads bytes into a character buffer
method : public : ReadBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
Name | Type | Description |
---|
offset | Int | destination buffer offset |
num | Int | number of values to read |
buffer | Char[] | input buffer |
Return
Type | Description |
---|
Int | number of values read |
ReadByte
Reads a byte
method : public : ReadByte() ~ Byte
Return
Type | Description |
---|
Byte | byte read |
ReadLine
Reads a string until a newline or character return is detected
method : public : ReadLine() ~ System.String
Return
Type | Description |
---|
String | character string |
WriteBuffer
Writes bytes from a buffer
method : public : WriteBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
Name | Type | Description |
---|
offset | Int | destination buffer offset |
num | Int | number of values to write |
buffer | Byte[] | input buffer |
Return
Type | Description |
---|
Int | number of values written |
Writes characters from a buffer
method : public : WriteBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
Name | Type | Description |
---|
offset | Int | destination buffer offset |
num | Int | number of values to write |
buffer | Char[] | input buffer |
Return
Type | Description |
---|
Int | number of values written |
WriteByte
Writes a byte
method : public : WriteByte(b:Int) ~ Bool
Parameters
Name | Type | Description |
---|
b | Int | byte to write |
Return
Type | Description |
---|
Bool | true if byte was written, false otherwise |
WriteString
Writes a character string
method : public : WriteString(str:System.String) ~ Nil
Parameters
Name | Type | Description |
---|
str | String | string to be written |