• Home
  • Raw
  • Download

Lines Matching refs:clientSocket

92         int clientSocket = pair.first;  in run()  local
93 if (close(clientSocket) != 0) { in run()
109 int clientSocket = pair.first; in sendToAllClients() local
111 if (sendToClientSocket(data, length, clientSocket, clientId)) { in sendToAllClients()
133 int clientSocket = pair.first; in sendToClientById() local
134 sent = sendToClientSocket(data, length, clientSocket, thisClientId); in sendToClientById()
143 int clientSocket = accept(mSockFd, NULL, NULL); in acceptClientConnection() local
144 if (clientSocket < 0) { in acceptClientConnection()
148 close(clientSocket); in acceptClientConnection()
165 mPollFds[i].fd = clientSocket; in acceptClientConnection()
174 close(clientSocket); in acceptClientConnection()
178 mClients[clientSocket] = clientData; in acceptClientConnection()
188 void SocketServer::handleClientData(int clientSocket) { in handleClientData() argument
189 const ClientData &clientData = mClients[clientSocket]; in handleClientData()
193 recv(clientSocket, mRecvBuffer.data(), mRecvBuffer.size(), MSG_DONTWAIT); in handleClientData()
199 disconnectClient(clientSocket); in handleClientData()
206 void SocketServer::disconnectClient(int clientSocket) { in disconnectClient() argument
209 mClients.erase(clientSocket); in disconnectClient()
211 close(clientSocket); in disconnectClient()
215 if (mPollFds[i].fd == clientSocket) { in disconnectClient()
229 int clientSocket, uint16_t clientId) { in sendToClientSocket() argument
231 ssize_t bytesSent = send(clientSocket, data, length, 0); in sendToClientSocket()