This is the lichat-tcp-server Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:37:04 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
lichat-tcp-server
A simple TCP server implementation for lichat.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shirakumo/lichat-tcp-server.git)
zlib
1.0.0
lichat-protocol
(system).
lichat-serverlib
(system).
usocket
(system).
bordeaux-threads
(system).
documentation-utils
(system).
verbose
(system).
package.lisp
(file).
server.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
lichat-tcp-server/lichat-tcp-server.asd
lichat-tcp-server/package.lisp
lichat-tcp-server/server.lisp
lichat-tcp-server/documentation.lisp
lichat-tcp-server/lichat-tcp-server.asd
lichat-tcp-server
(system).
lichat-tcp-server/server.lisp
package.lisp
(file).
lichat-tcp-server
(system).
*default-port*
(special variable).
channel
(class).
close-connection
(method).
close-connection
(method).
connection
(class).
connection-limit
(reader method).
(setf connection-limit)
(writer method).
connections
(reader method).
(setf connections)
(writer method).
ensure-hostname
(function).
establish-connection
(method).
handle-connection
(method).
handle-connection
(method).
handle-connection
(method).
hostname
(reader method).
hostname
(reader method).
(setf hostname)
(writer method).
(setf hostname)
(writer method).
init-connection
(method).
lock
(reader method).
lock
(reader method).
lock
(reader method).
lock
(reader method).
(setf lock)
(writer method).
(setf lock)
(writer method).
(setf lock)
(writer method).
(setf lock)
(writer method).
make-channel
(method).
make-connection
(method).
make-user
(method).
open-connection
(method).
ping-interval
(reader method).
(setf ping-interval)
(writer method).
port
(reader method).
port
(reader method).
(setf port)
(writer method).
(setf port)
(writer method).
process
(method).
process
(method).
send
(method).
send
(method).
server
(class).
socket
(reader method).
socket
(reader method).
(setf socket)
(writer method).
(setf socket)
(writer method).
teardown-connection
(method).
teardown-connection
(method).
thread
(reader method).
thread
(reader method).
(setf thread)
(writer method).
(setf thread)
(writer method).
user
(class).
back-queue
(reader method).
(setf back-queue)
(writer method).
queue
(reader method).
(setf queue)
(writer method).
send-queued-messages
(method).
lichat-tcp-server/documentation.lisp
server.lisp
(file).
lichat-tcp-server
(system).
Packages are listed by definition order.
lichat-tcp-server
org.shirakumo.lichat.tcp-server
common-lisp
.
*default-port*
(special variable).
channel
(class).
close-connection
(generic function).
connection
(class).
connection-limit
(generic reader).
(setf connection-limit)
(generic writer).
connections
(generic reader).
(setf connections)
(generic writer).
ensure-hostname
(function).
establish-connection
(generic function).
handle-connection
(generic function).
hostname
(generic reader).
(setf hostname)
(generic writer).
lock
(generic reader).
(setf lock)
(generic writer).
open-connection
(generic function).
ping-interval
(generic reader).
(setf ping-interval)
(generic writer).
port
(generic reader).
(setf port)
(generic writer).
server
(class).
socket
(generic reader).
(setf socket)
(generic writer).
thread
(generic reader).
(setf thread)
(generic writer).
user
(class).
back-queue
(generic reader).
(setf back-queue)
(generic writer).
queue
(generic reader).
(setf queue)
(generic writer).
send-queued-messages
(generic function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The standard port on which the server will run.
Should be 1111.
Ensures that the host-ish is turned into a hostname string.
Stop accepting incoming connections and close all existing ones.
Can be used with either a SERVER or a CONNECTION.
See CONNECTIONS
See THREAD
See SERVER
See CONNECTION
connection
)) ¶Accessor to the list of connections on the server.
See SERVER
See CONNECTION
Responsible for establishing a new connection to a client.
This will construct and push a new CONNECTION object onto the server using the given socket. It will also launch the CONNECTION’s background handling thread.
Handle the socket with the given object.
The object should be either a SERVER or a CONNECTION.
In the case of the server, it will listen for new clients
and if one is found, call ESTABLISH-CONNECTION.
In the case of the client, it will first manage connection
establishment as per the Lichat protocol, then repeatedly
wait for a new update with a timeout. If the timeout is
reached, a PING update is sent to the connection. If an
update is received, it is PROCESSED. If the socket ever
experiences a connection problem (timeout, shutdown, reset,
etc) then the connection is immediately closed.
Provides a CLOSE-CONNECTION restart as mandated by the
serverlib.
See SERVER
See CONNECTION
See ESTABLISH-CONNECTION
See LICHAT-SERVERLIB:PROCESS
connection
)) ¶connection
)) ¶Accessor to the hostname of the connection.
See CONNECTION
connection
)) ¶automatically generated reader method
connection
)) ¶automatically generated writer method
Accessor to the lock of the object that is used to mutually exclude access.
See SERVER
See CONNECTION
See USER
See CHANNEL
channel
)) ¶automatically generated reader method
lock
.
connection
)) ¶automatically generated reader method
lock
.
user
)) ¶automatically generated writer method
lock
.
channel
)) ¶automatically generated writer method
lock
.
connection
)) ¶automatically generated writer method
lock
.
Start accepting incoming connections on the server.
This will launch a background thread which will call HANDLE-CONNECTION on the socket and server.
See HANDLE-CONNECTION
See THREAD
See SERVER
Accessor to the amount of seconds to wait for an update before sending a PING.
See SERVER
Accessor to the port of the connection.
See CONNECTION
Accessor to the TCP socket of the connection.
See USOCKET:SOCKET
See CONNECTION
connection
)) ¶automatically generated reader method
connection
)) ¶automatically generated writer method
Accessor to the background processing thread of the object.
See SERVER
See CONNECTION
connection
)) ¶automatically generated reader method
connection
)) ¶automatically generated writer method
connection
) update) ¶lichat-serverlib
.
connection
) (update create
)) ¶lichat-serverlib
.
connection
) (update register
)) ¶lichat-serverlib
.
object
) (connection connection
)) ¶lichat-serverlib
.
connection
)) ¶lichat-serverlib
.
connection
)) ¶lichat-serverlib
.
Channel class.
Access to the channel is properly handled for
mutual exclusion from threads by its LOCK. Particularly,
the following methods are mutually excluded via this lock:
LICHAT-SERVERLIB:JOIN
LICHAT-SERVERLIB:LEAVE
See LICHAT-SERVERLIB:CHANNEL
See LOCK
backlogged-channel
.
(setf lock)
.
lock
.
send
.
Connection class. Each connection to a client will have an instance of this class.
Access to the connection is properly handled for
mutual exclusion from threads by its LOCK. Particularly,
the following methods are mutually excluded via this lock:
LICHAT-SERVERLIB:SEND
See LICHAT-SERVERLIB:FLOOD-PROTECTED-CONNECTION
See SOCKET
See THREAD
See LOCK
flood-protected-connection
.
(setf back-queue)
.
back-queue
.
close-connection
.
handle-connection
.
handle-connection
.
(setf hostname)
.
hostname
.
init-connection
.
(setf lock)
.
lock
.
(setf port)
.
port
.
process
.
process
.
(setf queue)
.
queue
.
send
.
send-queued-messages
.
(setf socket)
.
socket
.
teardown-connection
.
teardown-connection
.
(setf thread)
.
thread
.
Initarg | Value |
---|---|
:socket | (error socket required.) |
:hostname
:socket
:thread
(make-array 0 :adjustable t :fill-pointer t)
(make-array 0 :adjustable t :fill-pointer t)
Server class. You should instantiate this.
Access to the server is properly handled for
mutual exclusion from threads by its LOCK. Particularly,
the following updates and processing methods for updates
are mutually excluded via this lock:
LICHAT-SERVERLIB:TEARDOWN-CONNECTION
LICHAT-PROTOCOL:CONNECT
LICHAT-PROTOCOL:REGISTER
LICHAT-PROTOCOL:CREATE
See LICHAT-SERVERLIB:FLOOD-PROTECTED-SERVER
See HOSTNAME
See PORT
See THREAD
See PING-INTERVAL
See LOCK
See CONNECTIONS
flood-protected-server
.
close-connection
.
(setf connection-limit)
.
connection-limit
.
(setf connections)
.
connections
.
establish-connection
.
handle-connection
.
(setf hostname)
.
hostname
.
(setf lock)
.
lock
.
make-channel
.
make-connection
.
make-user
.
open-connection
.
(setf ping-interval)
.
ping-interval
.
(setf port)
.
port
.
(setf socket)
.
socket
.
(setf thread)
.
thread
.
Initarg | Value |
---|---|
:name | (machine-instance) |
:hostname | localhost |
:port | *default-port* |
:thread | nil |
:ping-interval | 10 |
:connection-limit | 100 |
:hostname
:thread
:ping-interval
:connection-limit
User class.
Access to the user is properly handled for
mutual exclusion from threads by its LOCK. Particularly,
the following methods are mutually excluded via this lock:
LICHAT-SERVERLIB:JOIN
LICHAT-SERVERLIB:LEAVE
See LICHAT-SERVERLIB:USER
See LOCK
connection
)) ¶automatically generated reader method
connection
)) ¶automatically generated writer method
connection
)) ¶automatically generated reader method
connection
)) ¶automatically generated writer method
connection
)) ¶Jump to: | (
B C E F G H I L M O P Q S T |
---|
Jump to: | (
B C E F G H I L M O P Q S T |
---|
Jump to: | *
B C H L P Q S T |
---|
Jump to: | *
B C H L P Q S T |
---|
Jump to: | C D F L P S U |
---|
Jump to: | C D F L P S U |
---|