mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 07:57:12 +01:00
creatures, fixe
This commit is contained in:
@@ -11,6 +11,11 @@ Connection::Connection() :
|
||||
{
|
||||
}
|
||||
|
||||
Connection::~Connection()
|
||||
{
|
||||
disconnect();
|
||||
}
|
||||
|
||||
void Connection::poll()
|
||||
{
|
||||
ioService.poll();
|
||||
@@ -28,6 +33,11 @@ void Connection::connect(const std::string& host, uint16 port, const ConnectCall
|
||||
m_timer.async_wait(std::bind(&Connection::onTimeout, shared_from_this(), std::placeholders::_1));
|
||||
}
|
||||
|
||||
void Connection::disconnect()
|
||||
{
|
||||
m_socket.close();
|
||||
}
|
||||
|
||||
void Connection::send(uint8* buffer, uint16 size)
|
||||
{
|
||||
asio::async_write(m_socket,
|
||||
|
||||
Reference in New Issue
Block a user