Skip to content

Implements the common code necessary for Uberserver clients

Notifications You must be signed in to change notification settings

MasterBel2/UberserverClientCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UberserverClientCore

A Swift implementation of the common functionality required for multiplayer lobby clients connecting to implementations of the Spring Lobby Protocol.

This project is primarily experiemental, and as such has been prioritising exploration over completeness. Contact MasterBel2 if you wish to make use of this project, and require any guidance or further functionality, he will be more than happy to help you out.

Structure

The implementation is based around the concept of a Client, which may initiate a connection to a server. See a diagram below:

 Client
    |
 Connection?
    |
AutheticatedSession or UnauthenticatedSession (default)
    |                             |
(Information about server     (Implements login + register
state, login credentials,     functionality.)
etc.)

When connected to a server, a client will own a Connection. By default a connection maintains an UnauthenticatedSession, which allows the client to log in or register. When logged in the connection will maintain an AuthenticatedSession which contains all information about the server state, including the battle list, user list, an optional battleroom, battleroom, and a channel list. It also contains information about the account the client used to authenticate, such as its username.

Implementing your custom client

Your lobby client should create a Client object for each Connection they wish to create, and connect using Client.connect(to serverAddress:). Most major data stores conform to UpdateNotifier. UpdateNotifier will inform associated objects . Add an associated object with addObject(_:).

See here for an example implementation.

Relevant data

Various other systems (such as downloading resources and launching games) are implemented in this package.

Some systems are implemented outside this package.

About

Implements the common code necessary for Uberserver clients

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages