Subversion Repositories HomeAutomation

Rev

Rev 1642 | Rev 1916 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1642 Rev 1898
Line 23... Line 23...
23
#include <boost/lexical_cast.hpp>
23
#include <boost/lexical_cast.hpp>
24
 
24
 
25
namespace atom {
25
namespace atom {
26
namespace net {
26
namespace net {
27
 
27
 
-
 
28
logging::Logger TcpClient::LOG("net::TcpClient");
-
 
29
 
28
TcpClient::TcpClient(boost::asio::io_service& io_service, ClientId id, ServerId server_id) : socket_(io_service), Client(io_service, id, server_id)
30
TcpClient::TcpClient(boost::asio::io_service& io_service, ClientId id, ServerId server_id) : socket_(io_service), Client(io_service, id, server_id)
29
{
31
{
30
}
32
}
31
 
33
 
32
TcpClient::~TcpClient()
34
TcpClient::~TcpClient()
Line 101... Line 103...
101
{
103
{
102
    if (this->acceptor_.use_count() != 0)
104
    if (this->acceptor_.use_count() != 0)
103
    {
105
    {
104
        return;
106
        return;
105
    }
107
    }
106
   
108
 
107
    try
109
    try
108
    {
110
    {
109
        if (this->socket_.is_open())
111
        if (this->socket_.is_open())
110
        {
112
        {
111
            this->socket_.send(boost::asio::buffer(data.Get(), data.GetMaxSize()));
113
            this->socket_.send(boost::asio::buffer(data.Get(), data.GetMaxSize()));