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

Method resolveService

tools/streamer_recorder/PracticalSocket.cpp:168–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168unsigned short Socket::resolveService(const string &service,
169 const string &protocol) {
170 struct servent *serv; /* Structure containing service information */
171
172 if ((serv = getservbyname(service.c_str(), protocol.c_str())) == NULL)
173 return atoi(service.c_str()); /* Service is port number */
174 else
175 return ntohs(serv->s_port); /* Found port (network byte order) by name */
176}
177
178// CommunicatingSocket Code
179

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected