MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / accept

Method accept

util/Socket.cpp:221–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221Socket *Socket::accept(void)
222{
223 SOCKET clientsd;
224 int m = 1;
225 SockAddr remoteaddr;
226 SOCKLEN_T addrlen = sizeof(struct sockaddr_storage);
227
228 if(sd == INVALID_SOCKET) THROW("Not connected");
229
230 TRY_SOCK(clientsd = ::accept(sd, &remoteaddr.u.sa, &addrlen));
231 TRY_SOCK(setsockopt(clientsd, IPPROTO_TCP, TCP_NODELAY, (char *)&m,
232 sizeof(int)));
233
234 return new Socket(clientsd);
235}
236
237
238const char *Socket::remoteName(void)

Callers 2

runMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64