15 TCP: Unit and Signature
The net/tcp-sig and net/tcp-unit libraries define a tcp^ signature and tcp@ implementation, where the implementation uses scheme/tcp.
Some units in the "net" collection import tcp^, so that they can be used with transports other than plain TCP. For example, url@ imports tcp^.
See also tcp-redirect and make-ssl-tcp@.
15.1 TCP Signature
tcp^ : signature |
port-no
[
max-allow-wait
reuse?
hostname])
→
port-no
:
(and/c nonnegative-exact-integer?
(integer-in 1 65535))
max-allow-wait : nonnegative-exact-integer? = 4
reuse? : any/c = #f
Like tcp-listen from scheme/tcp.
hostname
port-no
[
local-hostname
local-port-no])
→
hostname : string?
port-no
:
(and/c nonnegative-exact-integer?
(integer-in 1 65535))
local-port-no
:
(integer-in 1 65535))
=
#f
Like tcp-connect from scheme/tcp.
hostname
port-no
[
local-hostname]
local-port-no)
→
hostname : string?
port-no
:
(and/c nonnegative-exact-integer?
(integer-in 1 65535))
local-port-no
:
(integer-in 1 65535))
Like tcp-connect/enable-break from scheme/tcp.
(tcp-accept listener)
→
listener : tcp-listener?
Like tcp-accept from scheme/tcp.
(tcp-accept/enable-break listener)
→
listener : tcp-listener?
Like tcp-accept/enable-break from scheme/tcp.
(tcp-accept-ready? listener) → boolean?
listener : tcp-listener?
Like tcp-accept-ready? from scheme/tcp.
listener : tcp-listener?
Like tcp-close from scheme/tcp.
(tcp-listener? v) → boolean?
v : any/c
Like tcp-listener? from scheme/tcp.
(tcp-abandon-port tcp-port) → void?
tcp-port : port?
Like tcp-abandon-port from scheme/tcp.
(tcp-addresses tcp-port [port-numbers?])
→
(values string? (integer-in 1 65535)
string? (integer-in 1 65535)))
tcp-port : port?
port-numbers? : any/c = #f
Like tcp-addresses from scheme/tcp.
15.2 TCP Unit
tcp@ : unit? |
Imports nothing and exports tcp^, implemented using scheme/tcp.