| 185 | } |
| 186 | |
| 187 | void CommunicatingSocket::connect(const string &foreignAddress, |
| 188 | unsigned short foreignPort) throw(SocketException) { |
| 189 | // Get the address of the requested host |
| 190 | sockaddr_in destAddr; |
| 191 | fillAddr(foreignAddress, foreignPort, destAddr); |
| 192 | |
| 193 | // Try to connect to the given port |
| 194 | if (::connect(sockDesc, (sockaddr *) &destAddr, sizeof(destAddr)) < 0) { |
| 195 | throw SocketException("Connect failed (connect())", true); |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | void CommunicatingSocket::send(const void *buffer, int bufferLen) |
| 200 | throw(SocketException) { |
nothing calls this directly
no test coverage detected