Basic relay link connection

This commit is contained in:
KimLS committed 2016-10-11 21:34:26 -07:00
1 parent 7a3147a3b3
commit 4ba0aa8e7f
360 files changed
+87742 -47

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include "tcp_connection.h"
namespace EQ
{
namespace Net
{
class TCPServer
{
public:
TCPServer();
~TCPServer();
void Listen(int port, bool ipv6, std::function<void(std::shared_ptr<TCPConnection>)> cb);
void Close();
void AddClient(uv_tcp_t *c);
private:
std::function<void(std::shared_ptr<TCPConnection>)> m_on_new_connection;
uv_tcp_t *m_socket;
};
}
}