Next: , Previous: SRFI-56 Predefined write sizes, Up: SRFI-56


39.18.8 SRFI-56 Predefined network encodings

— Scheme Procedure: read-network-uint16 [port]

Read two bytes in network byte order from the current input port. Return an unsigned integer. Optional arg port specifies a port to read from, instead.

— Scheme Procedure: read-network-uint32 [port]

Read four bytes in network byte order from the current input port. Return an unsigned integer. Optional arg port specifies a port to read from, instead.

— Scheme Procedure: read-network-uint64 [port]

Read eight bytes in network byte order from the current input port. Return an unsigned integer. Optional arg port specifies a port to read from, instead.

— Scheme Procedure: read-network-sint16 [port]

Read two bytes in network byte order from the current input port. Return a signed integer. Optional arg port specifies a port to read from, instead.

— Scheme Procedure: read-network-sint32 [port]

Read four bytes in network byte order from the current input port. Return a signed integer. Optional arg port specifies a port to read from, instead.

— Scheme Procedure: read-network-sint64 [port]

Read eight bytes in network byte order from the current input port. Return a signed integer. Optional arg port specifies a port to read from, instead.

— Scheme Procedure: write-network-uint16 n [port]

Write unsigned integer n as two bytes, in network byte order, to the current output port. Signal error if n is negative. Optional second arg port specifies a port to write to, instead.

— Scheme Procedure: write-network-uint32 n [port]

Write unsigned integer n as four bytes, in network byte order, to the current output port. Signal error if n is negative. Optional second arg port specifies a port to write to, instead.

— Scheme Procedure: write-network-uint64 n [port]

Write unsigned integer n as eight bytes, in network byte order, to the current output port. Signal error if n is negative. Optional second arg port specifies a port to write to, instead.

— Scheme Procedure: write-network-sint16 n [port]

Write signed integer n as two bytes, in network byte order, to the current output port. Optional second arg port specifies a port to write to, instead.

— Scheme Procedure: write-network-sint32 n [port]

Write signed integer n as four bytes, in network byte order, to the current output port. Optional second arg port specifies a port to write to, instead.

— Scheme Procedure: write-network-sint64 n [port]

Write signed integer n as eight bytes, in network byte order, to the current output port. Optional second arg port specifies a port to write to, instead.