YAPOG  0.0.1
Yet Another Pokemon Online Game
ServerSocket.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_SERVERSOCKET_HPP
2 # define YAPOG_SERVERSOCKET_HPP
3 
4 # include <SFML/Network/TcpListener.hpp>
5 
6 # include "YAPOG/Macros.hpp"
9 
10 namespace yap
11 {
12  class ClientSocket;
13 
14  class YAPOG_LIB ServerSocket : public Socket
15  {
17 
18  public:
19 
20  ServerSocket ();
21  virtual ~ServerSocket ();
22 
23  bool Listen (Int16 port);
24 
25  bool Accept (ClientSocket& client);
26 
27  void Close ();
28 
29  private:
30 
31  sf::TcpListener listener_;
32  };
33 } // namespace yap
34 
35 #endif // YAPOG_SERVERSOCKET_HPP