Last active
August 29, 2015 13:56
-
-
Save piscisaureus/9077207 to your computer and use it in GitHub Desktop.
domenic.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stream type: tcp | |
* fundamental unit: byte | |
* list representation: buffer | |
readOne() -> yields a byte (represented as a number) | |
read() -> yields a Buffer containing a 1..N bytes, implementation decides | |
// Stream type: text lines (e.g. after splitting a text files into lines) | |
* fundamental unit: line (string) | |
* list representation: array | |
readOne() -> yields a line (a string) | |
read() -> yields an array containing lines represented as strings | |
// Stream type: UDP datagrams (boundaries matter) | |
* fundamental unit: datagram (Buffer) | |
* list representation: array | |
readOne() -> yields a buffer containing a full datagram | |
read() -> yields an array containing separate datagrams (buffers) | |
// Stream type: arbitrary objects | |
* fundamental unit: Object | |
* list representation: array | |
readOne() -> yields an object | |
read() -> yields an array of objects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment