Liking cljdoc? Tell your friends :D

clj-sockets.core

Contains all of the functions that make up the public API of this project.

Contains all of the functions that make up the public API of this project.
raw docstring

close-socketclj

(close-socket socket)

Close the socket, and also closes its input and output streams.

Close the socket, and also closes its input and output streams.
sourceraw docstring

create-serverclj

(create-server port)

Initialise a ServerSocket on localhost using a port. Passing in 0 for the port will automatically assign a port based on what's available.

Initialise a ServerSocket on localhost using a port.
Passing in 0 for the port will automatically assign a port based on what's
available.
sourceraw docstring

create-socketclj

(create-socket hostname port)

Connect a socket to a remote host. The call blocks until the socket is connected.

Connect a socket to a remote host. The call blocks until
the socket is connected.
sourceraw docstring

listenclj

(listen server-socket)

Waits for a connection from another socket to come through, then returns the server's now-connected Socket.

Waits for a connection from another socket to come through, then
returns the server's now-connected Socket.
sourceraw docstring

read-charclj

(read-char socket)

Read a single character from a socket.

Read a single character from a socket.
sourceraw docstring

read-lineclj

(read-line socket)

Read a line from the given socket

Read a line from the given socket
sourceraw docstring

read-linesclj

(read-lines socket)

Read all the lines currently loaded into the input stream of a socket.

Read all the lines currently loaded into the input stream of a socket.
sourceraw docstring

write-lineclj

(write-line socket message)

Send a line over the socket.

Send a line over the socket.
sourceraw docstring

write-toclj

(write-to socket message)

Send a string over the socket.

Send a string over the socket.
sourceraw docstring

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

× close