mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +00:00
Basic relay link connection
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user