| 51 | } |
| 52 | |
| 53 | TCPSocket::TCPSocket(const char* tag) { |
| 54 | sock_ = socket(AF_INET, SOCK_STREAM, 0); |
| 55 | if (sock_ < 0) { |
| 56 | std::ostringstream msg; |
| 57 | msg << tag << " Couldn't create socket (error: " << errno << ")"; |
| 58 | throw std::runtime_error(msg.str()); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | TCPSocket::TCPSocket(TCPSocket&& s) { |
| 63 | sock_ = s.sock_; |
nothing calls this directly
no outgoing calls
no test coverage detected