wire.bend relies on unsafe/foreign
raw source on the hub · import 0x60e7edc53d00f69422a2eae5eb5a80e7/wire.bend as Wire
1 import
import Base
Effects (foreign code)
effect connect source · line 9 · raw
@host:String -> @port:U32 -> @ms:U32 -> IO(Result<&1, &1, Pair(U32, String), Socket>)
TCP connect to an IPv4 address, with a deadline.
foreign: effs/wire.c, effs/wire.js
effect recv source · line 14 · raw
@sock:Socket -> @max:U32 -> @ms:U32 -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), String>))
foreign: effs/wire.c, effs/wire.js
effect send source · line 19 · raw
@sock:Socket -> @data:String -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), Unit>))
foreign: effs/wire.c, effs/wire.js
effect recv_from source · line 24 · raw
@sock:Socket -> @max:U32 -> @ms:U32 -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), Pair(String, Pair(U32, String))>))
foreign: effs/wire.c, effs/wire.js
effect send_to source · line 29 · raw
@sock:Socket -> @host:String -> @port:U32 -> @data:String -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), Unit>))
foreign: effs/wire.c, effs/wire.js
effect tls.connect source · line 36 · raw
@sock:Socket -> @host:String -> @ms:U32 -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), Unit>))
TLS over a connected TCP socket (OpenSSL 3, loaded at run time; BEND_LIBSSL overrides its path). The certificate chain and host name are always checked.
foreign: effs/wire.c, effs/wire.js
effect tls.send source · line 41 · raw
@sock:Socket -> @data:String -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), Unit>))
foreign: effs/wire.c, effs/wire.js
effect tls.recv source · line 47 · raw
@sock:Socket -> @max:U32 -> @ms:U32 -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), String>))
"" once the peer has closed.
foreign: effs/wire.c, effs/wire.js
effect tls.close source · line 53 · raw
@sock:Socket -> IO(Unit)
Ends the TLS session and closes the socket.
foreign: effs/wire.c, effs/wire.js