Gosu::ListenerSocket Class Reference

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

List of all members.

Public Member Functions

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

Public Attributes

boost::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 119 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

boost::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 135 of file Sockets.hpp.


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