diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2016-10-21 19:54:02 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-10-25 17:33:35 +0300 |
commit | 1f1d0a58713f4f4817827aa108f75e0657014813 (patch) | |
tree | eff7e58b59addf80982788177617215f4f840622 /platform/socket.hpp | |
parent | 8314310c0e8a63bed40abf95b7741b10c24521eb (diff) |
[tracking] Made tracking work
Diffstat (limited to 'platform/socket.hpp')
-rw-r--r-- | platform/socket.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/socket.hpp b/platform/socket.hpp index 9e0c2f75d3..ab955523d2 100644 --- a/platform/socket.hpp +++ b/platform/socket.hpp @@ -1,5 +1,6 @@ #pragma once +#include "std/cstdint.hpp" #include "std/string.hpp" #include "std/unique_ptr.hpp" @@ -25,5 +26,16 @@ public: virtual void SetTimeout(uint32_t milliseconds) = 0; }; +class StubSocket final : public Socket +{ +public: + // Socket overrides: + bool Open(string const & host, uint16_t port) override { return false; } + void Close() override {} + bool Read(uint8_t * data, uint32_t count) override { return false; } + bool Write(uint8_t const * data, uint32_t count) override { return false; } + void SetTimeout(uint32_t milliseconds) override {} +}; + unique_ptr<Socket> CreateSocket(); } // namespace platform |