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

Method getLocalAddress

tools/streamer_recorder/PracticalSocket.cpp:116–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116string Socket::getLocalAddress() throw(SocketException) {
117 sockaddr_in addr;
118 unsigned int addr_len = sizeof(addr);
119
120 if (getsockname(sockDesc, (sockaddr *) &addr, (socklen_t *) &addr_len) < 0) {
121 throw SocketException("Fetch of local address failed (getsockname())", true);
122 }
123 return inet_ntoa(addr.sin_addr);
124}
125
126unsigned short Socket::getLocalPort() throw(SocketException) {
127 sockaddr_in addr;

Callers

nothing calls this directly

Calls 1

SocketExceptionClass · 0.85

Tested by

no test coverage detected