Lines Matching refs:mSocket
29 : mSocket(-1), in ClientSocket()
43 mSocket = socket(AF_INET, SOCK_STREAM, 0); in init()
44 if (mSocket < 0) { in init()
49 if (setsockopt(mSocket, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)) == -1) { in init()
64 if (connect(mSocket, (struct sockaddr *)&serverAddr, sizeof(serverAddr)) < 0) { in init()
83 flOriginal = fcntl(mSocket, F_GETFL,0); in readData()
88 if (fcntl(mSocket, F_SETFL, flOriginal | O_NONBLOCK) == -1) { in readData()
105 FD_SET(mSocket, &rfds); in readData()
106 if (select(mSocket + 1, &rfds, NULL, NULL, &tv) == -1) { in readData()
111 if (!FD_ISSET(mSocket, &rfds)) { in readData()
117 read = recv(mSocket, (void*)data, toRead, 0); in readData()
134 fcntl(mSocket, F_SETFL, flOriginal); // now blocking again in readData()
144 sent = send(mSocket, (void*)data, (size_t)toSend, 0); in sendData()
160 if (mSocket != -1) { in release()
161 close(mSocket); in release()
162 mSocket = -1; in release()