Rev 1596 | Rev 1598 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1596 | Rev 1597 | ||
|---|---|---|---|
| Line 117... | Line 117... | ||
| 117 | } |
117 | } |
| 118 | } |
118 | } |
| 119 | 119 | ||
| 120 | void Monitor::SlotOnNewDataHandler(net::ClientId client_id, net::ServerId server_id, type::Byteset data) |
120 | void Monitor::SlotOnNewDataHandler(net::ClientId client_id, net::ServerId server_id, type::Byteset data) |
| 121 | { |
121 | { |
| 122 | std::string str |
122 | std::string str = data.ToCharString(); |
| 123 | 123 | ||
| 124 | boost::algorithm:: |
124 | boost::algorithm::trim_right_if(str, boost::is_any_of("\r\n")); |
| 125 | 125 | ||
| 126 | LOG.Debug("Received: \"" + str + "\" from client " + boost::lexical_cast<std::string>(client_id) + " on server " + boost::lexical_cast<std::string>(server_id)); |
126 | LOG.Debug("Received: \"" + str + "\" from client " + boost::lexical_cast<std::string>(client_id) + " on server " + boost::lexical_cast<std::string>(server_id)); |
| 127 | 127 | ||
| 128 | if (str == "q" || str == "quit") |
128 | if (str == "q" || str == "quit") |
| 129 | { |
129 | { |