Commit 9359ce6a authored by Colomban Wendling's avatar Colomban Wendling
Browse files

LibOVCCClient: add WIP Server class

parent b5a89998
namespace OVCCClient
{
public errordomain ServerError
{
INVALID_NICKNAME,
NICKNAME_IN_USE,
MISSING_AUTHENTICATION,
FAILED
}
[Flags]
public enum TablesFilter
{
ALL,
OPEN
}
public class Server : Object
{
private string host;
private uint16 port;
private SocketClient socket;
private SocketConnexion connexion;
public Server (string host,
uint port)
{
socket = new SocketClient ();
host = host;
port = port;
}
~Server ()
{
connexion.close ();
}
public /*async*/ bool connect (Player player)
throws ServerError
{
try {
connexion = socket.connect (host, port, null);
} /* ... */
}
public List<OVCC.Game> enumerate_tables (TablesFilter filter)
{
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment