Gosu::ListenerSocket Class Reference

Wraps a TCP socket that waits on a specific port and can create CommSocket instances via its onConnection event. More...

Public Member Functions

 ListenerSocket (SocketPort port)
 
 ~ListenerSocket ()
 
SocketAddress address () const
 
SocketPort port () const
 
void update ()
 

Public Attributes

std::tr1::function< void(Socket &)> onConnection
 This signal is fired by update() whenever someone connects to the port which is currently listened on.
 

Detailed Description

Wraps a TCP socket that waits on a specific port and can create CommSocket instances via its onConnection event.

Definition at line 117 of file Sockets.hpp.

Constructor & Destructor Documentation

Gosu::ListenerSocket::ListenerSocket ( SocketPort  port)
Gosu::ListenerSocket::~ListenerSocket ( )

Member Function Documentation

SocketAddress Gosu::ListenerSocket::address ( ) const
SocketPort Gosu::ListenerSocket::port ( ) const
void Gosu::ListenerSocket::update ( )

Member Data Documentation

std::tr1::function<void (Socket&)> Gosu::ListenerSocket::onConnection

This signal is fired by update() whenever someone connects to the port which is currently listened on.

Definition at line 133 of file Sockets.hpp.


The documentation for this class was generated from the following file: