summaryrefslogtreecommitdiffstats
path: root/src/OSSupport
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-28 21:35:45 +0100
committermadmaxoft <github@xoft.cz>2014-03-28 21:35:45 +0100
commit773ce7fde692e86531e1e92f42776e316b793d83 (patch)
tree33a45b7333f583292ed87983dba9563b2cad6f84 /src/OSSupport
parentFixed compilation after last PR merge. (diff)
downloadcuberite-773ce7fde692e86531e1e92f42776e316b793d83.tar
cuberite-773ce7fde692e86531e1e92f42776e316b793d83.tar.gz
cuberite-773ce7fde692e86531e1e92f42776e316b793d83.tar.bz2
cuberite-773ce7fde692e86531e1e92f42776e316b793d83.tar.lz
cuberite-773ce7fde692e86531e1e92f42776e316b793d83.tar.xz
cuberite-773ce7fde692e86531e1e92f42776e316b793d83.tar.zst
cuberite-773ce7fde692e86531e1e92f42776e316b793d83.zip
Diffstat (limited to '')
-rw-r--r--src/OSSupport/ListenThread.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/OSSupport/ListenThread.h b/src/OSSupport/ListenThread.h
index 4e337d814..b2d806c82 100644
--- a/src/OSSupport/ListenThread.h
+++ b/src/OSSupport/ListenThread.h
@@ -29,43 +29,45 @@ class cListenThread :
typedef cIsThread super;
public:
- /// Used as the callback for connection events
+ /** Used as the callback for connection events */
class cCallback
{
public:
- /// This callback is called whenever a socket connection is accepted
+ virtual ~cCallback() {}
+
+ /** This callback is called whenever a socket connection is accepted */
virtual void OnConnectionAccepted(cSocket & a_Socket) = 0;
} ;
cListenThread(cCallback & a_Callback, cSocket::eFamily a_Family, const AString & a_ServiceName = "");
~cListenThread();
- /// Creates all the sockets, returns trus if successful, false if not.
+ /** Creates all the sockets, returns trus if successful, false if not. */
bool Initialize(const AString & a_PortsString);
bool Start(void);
void Stop(void);
- /// Call before Initialize() to set the "reuse" flag on the sockets
+ /** Call before Initialize() to set the "reuse" flag on the sockets */
void SetReuseAddr(bool a_Reuse = true);
protected:
typedef std::vector<cSocket> cSockets;
- /// The callback which to notify of incoming connections
+ /** The callback which to notify of incoming connections */
cCallback & m_Callback;
- /// Socket address family to use
+ /** Socket address family to use */
cSocket::eFamily m_Family;
- /// Sockets that are being monitored
+ /** Sockets that are being monitored */
cSockets m_Sockets;
- /// If set to true, the SO_REUSEADDR socket option is set to true
+ /** If set to true, the SO_REUSEADDR socket option is set to true */
bool m_ShouldReuseAddr;
- /// Name of the service that's listening on the ports; for logging purposes only
+ /** Name of the service that's listening on the ports; for logging purposes only */
AString m_ServiceName;