| 5 | namespace Star { |
| 6 | |
| 7 | TcpSocketPtr TcpSocket::connectTo(HostAddressWithPort const& addressWithPort) { |
| 8 | auto socket = TcpSocketPtr(new TcpSocket(addressWithPort.address().mode())); |
| 9 | socket->connect(addressWithPort); |
| 10 | return socket; |
| 11 | } |
| 12 | |
| 13 | TcpSocketPtr TcpSocket::listen(HostAddressWithPort const& addressWithPort) { |
| 14 | auto socket = TcpSocketPtr(new TcpSocket(addressWithPort.address().mode())); |