Lines Matching refs:client_sock
76 void* handleConnection(int client_sock, int fwd_cid, int fwd_port) { in handleConnection() argument
83 closeFileDescriptor(client_sock); in handleConnection()
97 closeFileDescriptor(client_sock); in handleConnection()
105 FD_SET(client_sock, &file_descriptors); in handleConnection()
108 int rv = select(MAX(client_sock, server_sock) + 1, &file_descriptors, nullptr, nullptr, in handleConnection()
115 if (FD_ISSET(client_sock, &file_descriptors)) { in handleConnection()
117 connected = transferBytes(client_sock, server_sock); in handleConnection()
122 connected = transferBytes(server_sock, client_sock); in handleConnection()
126 closeFileDescriptor(client_sock); in handleConnection()
150 int client_sock; in setupRoute() local
154 if ((client_sock = accept(proxy_socket, reinterpret_cast<sockaddr*>(&addr), in setupRoute()
158 closeFileDescriptor(client_sock); in setupRoute()
162 std::thread t(handleConnection, client_sock, fwd_cid, fwd_port); in setupRoute()