This is the lichat-tcp-client Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:36:59 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
lichat-tcp-client
A simple TCP client implementation for lichat
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shirakumo/lichat-tcp-client.git)
zlib
1.0.0
lichat-protocol
(system).
usocket
(system).
bordeaux-threads
(system).
documentation-utils
(system).
verbose
(system).
cl-base64
(system).
trivial-mimes
(system).
package.lisp
(file).
client.lisp
(file).
mini.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
lichat-tcp-client/lichat-tcp-client.asd
lichat-tcp-client/package.lisp
lichat-tcp-client/client.lisp
lichat-tcp-client/mini.lisp
lichat-tcp-client/documentation.lisp
lichat-tcp-client/lichat-tcp-client.asd
lichat-tcp-client
(system).
lichat-tcp-client/client.lisp
package.lisp
(file).
lichat-tcp-client
(system).
*default-port*
(special variable).
call-with-response
(method).
client
(class).
close-connection
(method).
connection-open-p
(method).
handle-connection
(method).
handle-fatal-error
(method).
hostname
(reader method).
(setf hostname)
(writer method).
open-connection
(method).
password
(reader method).
(setf password)
(writer method).
port
(reader method).
(setf port)
(writer method).
process
(method).
process
(method).
process
(method).
process
(method).
read-message
(method).
s
(compiler macro).
s
(function).
s-data
(function).
send
(method).
socket
(reader method).
(setf socket)
(writer method).
thread
(reader method).
(setf thread)
(writer method).
url
(method).
username
(reader method).
(setf username)
(writer method).
with-response
(macro).
socket-stream
(method).
with-eresponse
(macro).
lichat-tcp-client/mini.lisp
client.lisp
(file).
lichat-tcp-client
(system).
mini-client
(function).
mini-client
(class).
process
(method).
process
(method).
process
(method).
process
(method).
process
(method).
current-channel
(reader method).
(setf current-channel)
(writer method).
format-mini-line
(function).
handle-command
(method).
handle-command
(method).
handle-command
(method).
handle-command
(method).
handle-input
(method).
lichat-tcp-client/documentation.lisp
mini.lisp
(file).
lichat-tcp-client
(system).
Packages are listed by definition order.
lichat-tcp-client
org.shirakumo.lichat.tcp-client
common-lisp
.
*default-port*
(special variable).
call-with-response
(generic function).
client
(class).
close-connection
(generic function).
connection-open-p
(generic function).
handle-connection
(generic function).
handle-fatal-error
(generic function).
hostname
(generic reader).
(setf hostname)
(generic writer).
mini-client
(function).
mini-client
(class).
open-connection
(generic function).
password
(generic reader).
(setf password)
(generic writer).
port
(generic reader).
(setf port)
(generic writer).
process
(generic function).
read-message
(generic function).
s
(compiler macro).
s
(function).
s-data
(function).
send
(generic function).
socket
(generic reader).
(setf socket)
(generic writer).
thread
(generic reader).
(setf thread)
(generic writer).
url
(generic function).
username
(generic reader).
(setf username)
(generic writer).
with-response
(macro).
current-channel
(generic reader).
(setf current-channel)
(generic writer).
format-mini-line
(function).
handle-command
(generic function).
handle-input
(generic function).
socket-stream
(generic function).
with-eresponse
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The default TCP port on which to connect. Should be 1111.
Shorthand macro to await a response from the server that matches the update generated in the INIT form.
See CALL-WITH-RESPONSE
Shorthand to construct an update to the server.
TYPE is coerced to a symbol from the LICHAT-PROTOCOL package.
It is then used together with the initargs to create an update
instance. A :FROM initarg using the client’s USERNAME is
automatically added.
See SEND
Calls the function once a suitable response update has appeared on the client’s stream.
A suitable response is either an UPDATE with the same ID
as the update returned by INIT, or an UPDATE-FAILURE with
the same UPDATE-ID as the ID of the updated returned by
INIT. If another message is found that does not match, it
is simply ignored.
See READ-MESSAGE
See LICHAT-PROTOCOL:UPDATE-FAILURE
See LICHAT-PROTOCOL:UPDATE
See LICHAT-PROTOCOL:ID
See LICHAT-PROTOCOL:UPDATE-ID
Closes the connection to the server.
Attempts to be graceful by first sending a LICHAT-PROTOCOL:DISCONNECT update to the server, if it can.
See LICHAT-PROTOCOL:DISCONNECT
Handles the incoming updates from the server.
This repeatedly (while the stream is open) calls READ-MESSAGE
and then passes that message on to PROCESS. If a connection
stability error occurs during this (timout, shutdown, reset, etc)
then HANDLE-FATAL-ERROR is called.
A restart called CLOSE-CONNECTION is active during this, which
allows you to gracefully exit and close the connection.
See PROCESS
See HANDLE-FATAL-ERROR
This function is used to handle a fatal, aborting connection error.
You can use this to either simply close and exit, or to try
and reestablish a new connection.
See HANDLE-CONNECTION
Accessor to the TCP hostname the client is connecting to.
See CLIENT
Initiate the connection from the client to the connection.
Implements the proper connection procedure as mandated by the
protocol in §4.1. If the connection fails, for whatever reason,
an error is signalled. If the connection succeeds, a background
thread is started that calls HANDLE-CONNECTION.
See HANDLE-CONNECTION
Accessor to the password of the client, if any.
See CLIENT
See LICHAT-PROTOCOL:PASSWORD
Accessor to the TCP port the client is connecting over.
See CLIENT
This method is intended to be extended by user code and is called with any update received from the server.
Default methods exist for the following update types:
* LICHAT-PROTOCOL:PING – Automatically replies to the server
with a LICHAT-PROTOCOL:PONG update.
* LICHAT-PROTOCOL:DISCONNECT – Invoke the CLOSE-CONNECTION restart.
* T – Print the object via Verbose.
See HANDLE-CONNECTION
See LICHAT-PROTOCOL:PING
See LICHAT-PROTOCOL:DISCONNECT
join
) (client mini-client
)) ¶message
) (client mini-client
)) ¶text-update
) (client mini-client
)) ¶channel-update
) (client mini-client
)) ¶mini-client
)) ¶Reads wireables from the client’s stream until one can be read successfully.
This is to say, it will repeatedly try to read a message,
ignoring all LICHAT-PROTOCOL:WIRE-CONDITIONs until one can
be read without such an error. The message is returned.
See LICHAT-PROTOCOL:WIREABLE
See LICHAT-PROTOCOL:FROM-WIRE
See SOCKET-STREAM
Send an update over the client connection to the server.
See LICHAT-PROTOCOL:TO-WIRE
See SOCKET-STREAM
Accessor to the USOCKET:SOCKET instance that connects to the server.
See CLIENT
Accessor to the background processing thread of the client.
See CLIENT
Accessor to the username of the client.
See CLIENT
See LICHAT-PROTOCOL:USERNAME
Class to represent a Lichat client.
See USERNAME
See PASSWORD
See HOSTNAME
See PORT
See SOCKET
See THREAD
close-connection
.
connection-open-p
.
handle-connection
.
handle-fatal-error
.
(setf hostname)
.
hostname
.
open-connection
.
(setf password)
.
password
.
(setf port)
.
port
.
process
.
process
.
process
.
process
.
read-message
.
send
.
(setf socket)
.
socket
.
socket-stream
.
(setf thread)
.
thread
.
url
.
(setf username)
.
username
.
Initarg | Value |
---|---|
:username | (machine-instance) |
:password | nil |
:hostname | localhost |
:port | *default-port* |
:socket | nil |
:thread | nil |
:username
:password
:hostname
:socket
:thread
Shorthand like WITH-RESPONSE that signals an error if the matching update is not of type LICHAT-PROTOCOL:UPDATE or of type LICHAT-PROTOCOL:FAILURE.
See WITH-RESPONSE
See LICHAT-PROTOCOL:FAILURE
See LICHAT-PROTOCOL:UPDATE
mini-client
)) ¶automatically generated reader method
mini-client
)) ¶automatically generated writer method
mini-client
) (cmd (eql :leave)
) args) ¶mini-client
) (cmd (eql :join)
) args) ¶mini-client
) (cmd (eql :quit)
) args) ¶mini-client
) cmd args) ¶mini-client
) (line string
)) ¶Returns the stream of the socket of the client, if such is available.
See CLIENT
Jump to: | (
C F G H M O P R S T U W |
---|
Jump to: | (
C F G H M O P R S T U W |
---|
Jump to: | *
C H P S T U |
---|
Jump to: | *
C H P S T U |
---|
Jump to: | C D F L M P S |
---|
Jump to: | C D F L M P S |
---|