Home | History | Annotate | Download | only in src

Lines Matching refs:mSocket

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