2022-05-23 20:12:32 +02:00
|
|
|
# Documentation: stream.isbpl
|
|
|
|
|
2022-05-23 20:19:06 +02:00
|
|
|
Library to interact with IO streams and the internet.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
2022-05-24 16:40:48 +02:00
|
|
|
## >Functions
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
### `STREAM.stdin ::: -> path`
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Returns the path to the os-dependant unix-/dev/stdin equivalent
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### `stream.write ::: data id -> `
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Writes data to a stream
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### `stream ::: [DYN]`
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Native for actions related to streams
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### `stream.readline ::: id -> string`
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Returns the line that was read as a string. -1 means EOF.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
2022-05-24 16:40:48 +02:00
|
|
|
## >Variables
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
### STREAM.create.file.out
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate create.file.out action: `filename STREAM.create.file.out stream -> id`.
|
|
|
|
Creates an output stream.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### STREAM.create.file.in
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate create.file.in action: `filename STREAM.create.file.in stream -> id`.
|
|
|
|
Creates an input stream.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### STREAM.close
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate close action: `id STREAM.close stream -> `.
|
|
|
|
Closes a stream.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### STREAM.create.socket
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate create.socket action: `ip port STREAM.create.socket stream -> id`.
|
|
|
|
Creates an IO stream to a TCP server.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### STREAM.create.server
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate create.server action: `port STREAM.create.server stream -> id`.
|
|
|
|
Creates an input stream. Each int read from it is a new IO socket stream id.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### STREAM.read
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate read action: `id STREAM.read stream -> int`.
|
|
|
|
Reads a value from an input stream.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
### STREAM.write
|
|
|
|
|
2022-05-23 20:15:36 +02:00
|
|
|
Constant to indicate write action: `int id STREAM.write stream -> `.
|
|
|
|
Writes a value to an output stream.
|
2022-05-23 20:12:32 +02:00
|
|
|
|
|
|
|
|