Functions for creating a threaded TCP server.
Functions for creating a threaded TCP server.
(running? server)
True if the server is running.
True if the server is running.
(stop server)
Stop the TCP server and close all open connections.
Stop the TCP server and close all open connections.
(tcp-server & {:as options})
Create a new TCP server. Takes the following keyword arguments: :host - the host to bind to (defaults to 127.0.0.1) :port - the port to bind to :handler - a function to handle incoming connections, expects a socket as an argument :backlog - the maximum backlog of connections to keep (defaults to 50)
Create a new TCP server. Takes the following keyword arguments: :host - the host to bind to (defaults to 127.0.0.1) :port - the port to bind to :handler - a function to handle incoming connections, expects a socket as an argument :backlog - the maximum backlog of connections to keep (defaults to 50)
(wrap-io handler)
Wrap a handler so that it expects a Reader and Writer as arguments, rather than a raw Socket.
Wrap a handler so that it expects a Reader and Writer as arguments, rather than a raw Socket.
(wrap-streams handler)
Wrap a handler so that it expects an InputStream and an OutputStream as arguments, rather than a raw Socket.
Wrap a handler so that it expects an InputStream and an OutputStream as arguments, rather than a raw Socket.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close