All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ITcpClient.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "TcpClientCallback.h"
6 #include "ITcpSocket.h"
7 
8 namespace Eegeo
9 {
10  namespace Networking
11  {
12  class ITcpClient
13  {
14  public:
15  virtual ~ITcpClient() { }
16 
17  virtual const ITcpSocket& GetSocket() const = 0;
18 
19  virtual bool Read() = 0;
20  virtual void Write(const char* data, int length) const = 0;
21  virtual void Close() = 0;
22 
23  virtual void AddReadCallback(ITcpClientDataCallback& readCallback) = 0;
24  virtual void RemoveReadCallback(ITcpClientDataCallback& readCallback) = 0;
25  virtual void AddCloseCallback(ITcpClientCallback& closeCallback) = 0;
26  virtual void RemoveCloseCallback(ITcpClientCallback& closeCallback) = 0;
27  };
28  }
29 }