Liking cljdoc? Tell your friends :D
Clojure only.

lsp4clj.socket-server


bind-socketclj

(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.
sourceraw docstring

serverclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close