MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / connect

Method connect

tools/streamer_recorder/PracticalSocket.cpp:187–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void 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
199void CommunicatingSocket::send(const void *buffer, int bufferLen)
200 throw(SocketException) {

Callers

nothing calls this directly

Calls 2

fillAddrFunction · 0.85
SocketExceptionClass · 0.85

Tested by

no test coverage detected