Subversion Repositories HomeAutomation

Rev

Rev 1959 | Rev 1987 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1959 Rev 1986
Line 111... Line 111...
111
private:
111
private:
112
    net::SocketId client_id_;
112
    net::SocketId client_id_;
113
    std::string prompt_;
113
    std::string prompt_;
114
    std::vector<unsigned char> buffer_;
114
    std::vector<unsigned char> buffer_;
115
   
115
   
116
    void SlotOnNewStateHandler(net::SocketId client_id, net::SocketId server_id, net::ClientState client_state)
116
    void SlotOnNewStateHandler(net::SocketId client_id, net::ClientState client_state)
117
    {
117
    {
118
        if (client_state != net::CLIENT_STATE_CONNECTED)
118
        if (client_state != net::CLIENT_STATE_CONNECTED)
119
        {
119
        {
120
            std::cout << "Disconnected from server." << std::endl;
120
            std::cout << "Disconnected from server." << std::endl;
121
           
121
           
Line 123... Line 123...
123
            finish = true;
123
            finish = true;
124
            on_message_condition.notify_all();
124
            on_message_condition.notify_all();
125
        }
125
        }
126
    }
126
    }
127
   
127
   
-
 
128
    void SlotOnNewClientHandler(net::SocketId id, net::SocketId server_id)
-
 
129
    {
-
 
130
    }
-
 
131
   
128
    void SlotOnNewDataHandler(net::SocketId client_id, net::SocketId server_id, common::Byteset data)
132
    void SlotOnNewDataHandler(net::SocketId client_id, common::Byteset data)
129
    {
133
    {
130
        for (unsigned int n = 0; n < data.GetSize(); n++)
134
        for (unsigned int n = 0; n < data.GetSize(); n++)
131
        {
135
        {
132
            this->buffer_.push_back(data[n]);
136
            this->buffer_.push_back(data[n]);
133
        }
137
        }