summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/ListenThread.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-05 23:12:17 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-05 23:12:17 +0200
commit23395a5ce1daab24465d607575c09e06e5b7c449 (patch)
tree18555c220fc6e602b071a935b190ef25444f18a9 /src/OSSupport/ListenThread.h
parentFixed tolua++ override support (diff)
parentFixed Endiannes conversion routines for floats and doubles. (diff)
downloadcuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.gz
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.bz2
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.lz
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.xz
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.zst
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.zip
Diffstat (limited to 'src/OSSupport/ListenThread.h')
-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;