wire.bend relies on unsafe/foreign
raw source on the hub · import 0x5ce435229dc73113d04d9080d52039c1/wire.bend as Wire
1 import
import Base
Effects (foreign code)
effect recv source · line 7 · raw
@sock:Socket -> @max:U32 -> IO(Pair(Socket, Result<&1, &1, Pair(U32, String), String>))
foreign: effs/wire.c, effs/wire.js
effect send source · line 12 · 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 17 · raw
@sock:Socket -> @max: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 22 · 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 29 · raw
@sock:Socket -> @host:String -> 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 34 · 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 40 · raw
@sock:Socket -> @max: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 46 · raw
@sock:Socket -> IO(Unit)
Ends the TLS session and closes the socket.
foreign: effs/wire.c, effs/wire.js