(bind-socket {:keys [address port]})Binds to the :address (string, loopback by default) and :port (integer,
required).
Returns a map containing the :socket (a ServerSocket) and a :connection, a
future which will resolve (to a Socket) when a client connects.
The caller is responsible for closing the socket and the connection.
Binds to the `:address` (string, loopback by default) and `:port` (integer, required). Returns a map containing the `:socket` (a ServerSocket) and a `:connection`, a future which will resolve (to a Socket) when a client connects. The caller is responsible for closing the socket and the connection.
(server {:keys [address port] :as opts})(server opts {:keys [socket connection]})Start a socket server, given the specified opts:
:address Host or address, string, defaults to loopback address
:port Port, string or integer, required
Starts listening on the socket, blocks until a client establishes a connection, then returns a chan-server which communicates over the socket.
Start a socket server, given the specified opts: `:address` Host or address, string, defaults to loopback address `:port` Port, string or integer, required Starts listening on the socket, blocks until a client establishes a connection, then returns a chan-server which communicates over the socket.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |