Next: , Previous: , Up: srfi basic-socket spec   [Index]


2.34.3.6 Flag operations

The following bindings must be implemented as macros: address-family, address-info, socket-domain, ip-protocol, message-type and shutdown-method.

The following bindings are exported by the libraries (srfi :106) and (srfi :106 socket).

Syntax: address-family ?name

Return a proper address family from the given ?name. Implementations must support at least following names and must have the described behaviour.

inet

Returns *af-inet*.

inet6

Returns *af-inet6*.

unspec

Returns *af-unspec*.

Implementations may support more names such as unix or local or other names.

Syntax: address-info ?name

Return merged address info flags from given ?name. Implementations must support at least following names and must have the described behaviour.

canoname
canonname

Returns *ai-canonname*.

numerichost

Returns *ai-numerichost*.

v4mapped

Returns *ai-v4mapped*.

all

Returns *ai-all*.

addrconfig

Returns *ai-addrconfig*.

Implementations may support more names.

Syntax: socket-domain ?name

Return socket domain flags from the given ?name. Implementations must support at least following names and must have the described behaviour.

stream

Returns *sock-stream*.

datagram

Returns *sock-dgram*.

Implementations may support more names.

Syntax: ip-protocol ?name

Return ip-protocol flag from given ?name. Implementations must support at least following names and must have the described behaviour.

ip

Returns *ipproto-ip*.

tcp

Returns *ipproto-tcp*.

udp

Returns *ipproto-udp*.

Implementations may support more names.

Syntax: message-type ?name

Return message type flag from given name. The flag can be used both by socket-recv and socket-send. Implementations must support at least following names and must have the described behaviour.

none

Returns no flag.

peek

Returns *msg-peek*.

oob

Returns *msg-oob*.

wait-all

Returns *msg-waitall*.

Implementations may support more names.

Syntax: shutdown-method ?name

Return shutdown method flags from given ?names. Implementations must support at least following names and must have the described behaviour.

read

Returns *shut-rd*.

write

Returns *shut-wr*.

If shutdown-method is given both read and write, then it must return *shut-rdwr*.

Syntax: socket-merge-flags ?flags

Merge given ?flags and returns a new flag.

Syntax: socket-purge-flags ?base-flag ?flag

Remove ?flag from ?base-flag if it exists and return a new flag.


Next: , Previous: , Up: srfi basic-socket spec   [Index]