All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ITcpListener.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "TcpListenerState.h"
6 #include "TcpClientCallback.h"
7 
8 namespace Eegeo
9 {
10  namespace Networking
11  {
13  {
14  public:
15  virtual ~ITcpListener() { };
16 
17  virtual void StartListening(int port) = 0;
18  virtual void Update() = 0;
19  virtual void StopListening() = 0;
20 
21  virtual const TcpListenerState::Values GetState() const = 0;
22  virtual int GetPort() const = 0;
23 
24  virtual void AddClientConnectedCallback(ITcpClientCallback& callback) = 0;
25  virtual void RemoveClientConnectedCallback(ITcpClientCallback& callback) = 0;
26  virtual void AddClientDisconnectedCallback(ITcpClientCallback& callback) = 0;
27  virtual void RemoveClientDisconnectedCallback(ITcpClientCallback& callback) = 0;
28  };
29  }
30 }