8 Input and Output

A Racket port represents an input or output stream, such as a file, a terminal, a TCP connection, or an in-memory string. More specifically, an input port represents a stream from which a program can read data, and an output port represents a stream for writing data.

    8.1 Varieties of Ports

    8.2 Default Ports

    8.3 Reading and Writing Racket Data

    8.4 Datatypes and Serialization

    8.5 Bytes, Characters, and Encodings

    8.6 I/O Patterns