|
GNE
0.75.0
|
A Client-side connection to a game list server for retriving a list of games. More...
#include <ListServerConnection.h>
Classes | |
| struct | GameListData |
| Data about each game. More... | |
Public Member Functions | |
| ListServerConnection (std::string address) | |
| void | setGame (std::string gameName) |
| void | getGameList () |
Public Member Functions inherited from GNE::ClientConnection | |
| bool | open (const Address &dest, const ConnectionParams &p) |
| Opens the socket, ready for connect, but does not yet connect. | |
| void | connect () |
| Starts connection to the specified target. | |
| Error | waitForConnect () |
| Waits indefinitely for the connection attempt started by connect to finish. | |
Public Member Functions inherited from GNE::Connection | |
| virtual | ~Connection () |
| Destructor. | |
| SmartPtr< ConnectionListener > | getListener () const |
| Returns the currently registered event Listener. | |
| void | setListener (const SmartPtr< ConnectionListener > &listener) |
| Sets a new event listener. | |
| int | getTimeout () |
| Returns the timeout for this connection. | |
| void | setTimeout (int ms) |
| Sets the timeout for this connection in milliseconds. | |
| PacketStream & | stream () |
| Returns the PacketStream associated with this class. | |
| ConnectionStats | getStats (int reliable) const |
| If stats is enabled, returns Connection stats. | |
| Address | getLocalAddress (bool reliable) const |
| Returns the local address of this connection. | |
| Address | getRemoteAddress (bool reliable) const |
| Returns the remote address of this connection. | |
| State | getState () const |
| Returns the state this Connection is in. | |
| bool | isConnected () const |
| Returns true if this Connection is active and ready to send/recieve. | |
| void | disconnect () |
| Immediately disconnects this socket. | |
| void | disconnectSendAll (int waitTime=10000) |
| A blocking call that disconnects nicely. | |
Public Member Functions inherited from GNE::Thread | |
| Thread (std::string name=DEF_NAME, int priority=DEF_PRI) | |
| Creates a new thread, ready to run but not yet running. | |
| std::string | getName () const |
| Returns the name of this thread. | |
| virtual void | shutDown () |
| Makes a request that this thread should shutdown. | |
| void | join () |
| A blocking call that returns when this thread terminates, or returns immediately if the thread has terminated. | |
| bool | hasStarted () const |
| Returns true if this Thread has ever been started. | |
| bool | isRunning () const |
| Determine the running state of the thread. | |
| void | start () |
| Starts this thread running. | |
| int | getPriority () const |
| Returns the priority of this class. | |
Additional Inherited Members | |
Public Types inherited from GNE::ClientConnection | |
|
typedef SmartPtr < ClientConnection > | sptr |
| typedef WeakPtr< ClientConnection > | wptr |
Static Public Member Functions inherited from GNE::ClientConnection | |
| static sptr | create () |
| Creates a new ClientConnection object, managed by a SmartPtr. | |
Static Public Attributes inherited from GNE::Thread | |
| static const int | DEF_PRI = 0 |
| The default priority of a thread. | |
| static const std::string | DEF_NAME = "Thread" |
| The default name for a thread. | |
| static const int | LOW_PRI = -1 |
| A lowered priority for a thread. | |
| static const int | LOWER_PRI = -2 |
| A lower priority for a thread than LOW_PRI. | |
| static const int | HIGH_PRI = 1 |
| A "boosted priority" for a thread. | |
| static const int | HIGHER_PRI = 2 |
| Even higher priority thread than HIGH_PRI. | |
Protected Member Functions inherited from GNE::ClientConnection | |
| ClientConnection () | |
| Initializes this ClientConnection. | |
Protected Attributes inherited from GNE::Connection | |
| wptr | this_ |
| A weak pointer to this own object. | |
| SocketPair | sockets |
| The pair of sockets. | |
| PacketStream::sptr | ps |
| The PacketStream associated with this Connection. | |
Protected Attributes inherited from GNE::Thread | |
| volatile bool | shutdown |
| This variable is set to true when this thread should exit. | |
A Client-side connection to a game list server for retriving a list of games.
This stuff is all very preliminary. List server code will be completed last so don't pay attention to these classes at all.