lichat-serverlib

2023-10-21

Tools to help build a server using the lichat protocol.

Upstream URL

github.com/Shirakumo/lichat-serverlib

Author

Yukari Hafner <shinmera@tymoon.eu>

Maintainer

Yukari Hafner <shinmera@tymoon.eu>

License

zlib
README

About Lichat-Serverlib

This is an implementation of the server-side protocol part of the Lichat protocol. It provides an extensible, transport-agnostic implementation that can be used to base a functional server on. All that the real server needs to take care of is the underlying connection establishment and reading.

You do not need this library if you are looking to implement a client. You don't need it if you're looking to implement a server either, but it will take care of a large part of the implementation tasks for you if you do use it.

Implementing an Overarching Server

In order to implement an actual server, you will want to do the following:

  • Subclass at least server and connection.
  • Provide functions to start a listener on a server instance.
  • For each client that connects, create a connection object.
  • Provide functions to repeatedly read updates from a connection and send them to process.
  • Supply an after method on teardown-connection that closes the connection to the client properly.
  • Provide a primary method for send specialised on your connection subclass that handles the actual wire transmission of an update.
  • Handle potential synchronisation or mutual-exclusion issues to users, channels, profiles, and connections on the server if your server is multi-threaded.

For a simple illustrative example, see the lichat-tcp-server.

Also See

Dependencies (4)

  • crypto-shortcuts
  • documentation-utils
  • lichat-protocol
  • trivial-mimes
  • GitHub
  • Quicklisp