diff --git a/docs/api/srfi/106.md b/docs/api/srfi/106.md index dc25bf94..43f489cd 100644 --- a/docs/api/srfi/106.md +++ b/docs/api/srfi/106.md @@ -166,102 +166,145 @@ Calls a given procedure with a given socket as an argument. If given `proc` returns then it returns the result of `proc` and socket will be automatically closed. If `proc` doesn't return then given socket won't be closed automatically. It's analogy of `call-with-port`. - - - - - -Following, address-family, address-info, socket-domain, ip-protocol, message-type and shutdown-method must be implemented as macros. -address-family name -> address-family -Returns proper address family from given name. -Implementation must support at least following names and must have the described behaviour. -inet -Returns *af-inet* -inet6 -Returns *af-inet6* -unspec -Returns *af-unspec* -Implementation may support more names such as unix or local or other names. -address-info names ... -> address-info -Returns merged address info flags from given names. -Implementation must support at least following names and must have the described behaviour. -canoname -Returns *ai-canonname* -numerichost -Returns *ai-numerichost* -v4mapped -Returns *ai-v4mapped* -all -Returns *ai-all* -addrconfig -Returns *ai-addrconfig* -Implementation may support more names. -socket-domain name -> socket-domain -Returns socket domain flags from given name. -Implementation must support at least following names and must have the described behaviour. -stream -Returns *sock-stream* -datagram -Returns *sock-dgram* -Implementation may support more names. -ip-protocol name -> ip-protocol -Returns ip-protocol flag from given name. -Implementation must support at least following names and must have the described behaviour. -ip -Returns *ipproto-ip* -tcp -Returns *ipproto-tcp* -udp -Returns *ipproto-udp* -Implementation may support more names. -message-type names ... -> message-type -Returns message type flag from given name. -The flag can be used both socket-recv and socket-send. -Implementation 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* -Implementation may support more names. -shutdown-method names ... -> shutdown-method -Returns shutdown method flags from given names. -Implementation 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* -socket-merge-flags flags ... -> new-flags -Merges given flags and returns a new flag. -socket-purge-flags base-flag flags ... -> new-flags -Removes flags from base-flag if exists and returns a new flag. - # address-family +*Syntax* + + (address-family name) -> address-family + +Returns proper address family from given name. + + inet + +Returns `*af-inet*` + + inet6 + +Returns `*af-inet6*` + + unspec + +Returns `*af-unspec*` + # address-info +*Syntax* + + (address-info names ...) -> address-info + +Returns merged address info flags from given names. + + canoname + +Returns `*ai-canonname*` + + numerichost + +Returns `*ai-numerichost*` + + v4mapped + +Returns `*ai-v4mapped*` + + all + +Returns `*ai-all*` + + addrconfig + +Returns `*ai-addrconfig*` + # socket-domain +*Syntax* + + (socket-domain name) -> socket-domain + +Returns socket domain flags from given name. + + stream + +Returns `*sock-stream*` + + datagram + +Returns `*sock-dgram*` + # ip-protocol +*Syntax* + + (ip-protocol name) -> ip-protocol + +Returns ip-protocol flag from given name. + + ip + +Returns `*ipproto-ip*` + + tcp + +Returns `*ipproto-tcp*` + + udp + +Returns `*ipproto-udp*` + # message-type +*Syntax* + + (message-type names ...) -> message-type + +Returns message type flag from given name. + +The flag can be used both socket-recv and socket-send. + + none + +Returns no flag. + + peek + +Returns `*msg-peek*` + + oob + +Returns `*msg-oob*` + + wait-all + +Returns `*msg-waitall*` + # shutdown-method +*Syntax* + + (shutdown-method names ...) -> shutdown-method + +Returns shutdown method flags from given names. + + read + +Returns `*shut-rd*` + + write + +Returns `*shut-wr*` + +If shutdown-method is given both read and write, then it must return `*shut-rdwr*` + # socket-merge-flags + (socket-merge-flags flags ...) -> new-flags + +Merges given `flags` and returns a new flag. + # socket-purge-flags + (socket-purge-flags base-flag flags ...) -> new-flags - - - - - +Removes `flags` from `base-flag` if exists and returns a new flag. # \*af-unspec\*