Lines Matching refs:m_fd
164 m_fd = INVALID_SOCKET;
189 closesocket(m_fd);
190 m_fd = INVALID_SOCKET;
201 if (m_fd != INVALID_SOCKET)
223 if (m_fd != INVALID_SOCKET)
225 shutdown(m_fd, 1 /* SD_SEND */);
257 if (m_fd != INVALID_SOCKET && !m_server)
311 if (m_fd == INVALID_SOCKET)
317 if (getsockname(m_fd, &addr, &size) == SOCKET_ERROR)
370 if (m_fd != INVALID_SOCKET)
388 m_fd = socket(m_local->m_realfamily, SOCK_STREAM, 0);
390 if (m_fd == INVALID_SOCKET)
396 ioctlsocket(m_fd, FIONBIO, (u_long FAR *) &arg);
404 setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(arg));
411 if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) ||
412 (getsockname(m_fd,
415 (listen(m_fd, 5) != 0))
451 if (m_fd == INVALID_SOCKET || !m_server)
474 connection->m_fd = accept(m_fd, &from, &fromlen);
476 if (connection->m_fd == INVALID_SOCKET)
508 ioctlsocket(connection->m_fd, FIONBIO, (u_long FAR *) &arg);
525 if (this && m_fd == INVALID_SOCKET) {
567 if (m_fd != INVALID_SOCKET)
585 m_fd = socket(m_peer->m_realfamily,
588 if (m_fd == INVALID_SOCKET)
594 ioctlsocket(m_fd, FIONBIO, (u_long FAR *) &arg);
600 setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(arg));
606 bind(m_fd, m_local->m_addr, m_local->m_len);
610 ret = connect(m_fd, m_peer->m_addr, m_peer->m_len);
677 if (m_fd != INVALID_SOCKET)
694 m_fd = socket(m_local->m_realfamily, SOCK_DGRAM, 0);
696 if (m_fd == INVALID_SOCKET)
702 ioctlsocket(m_fd, FIONBIO, (u_long FAR *) &arg);
707 setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(arg));
713 if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) ||
714 (getsockname(m_fd,
738 if (m_fd == INVALID_SOCKET || m_server)
775 if (m_fd == INVALID_SOCKET || m_server)
831 FD_SET(m_fd, &readfds);
833 FD_SET(m_fd, &writefds);
834 FD_SET(m_fd, &exceptfds);
850 if (select(m_fd + 1, &readfds, &writefds, &exceptfds,
858 if (FD_ISSET(m_fd, &exceptfds))
868 if (FD_ISSET(m_fd, &readfds))
883 if (FD_ISSET(m_fd, &writefds))
892 getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);
1029 if (getsockopt(m_fd, level, optname, (char*)optval, optlen) == 0)
1039 if (setsockopt(m_fd, level, optname, (char*)optval, optlen) == 0)
1059 FD_SET(m_fd, &readfds);
1080 FD_SET(m_fd, &writefds);
1101 FD_SET(m_fd, &writefds);
1102 FD_SET(m_fd, &exceptfds);
1108 if (!FD_ISSET(m_fd, &writefds))
1119 return recv(m_fd, buffer, size, 0);
1129 ret = recvfrom(m_fd, buffer, size, 0, &from, &fromlen);
1158 return send(m_fd, buffer, size, 0);
1180 ret = sendto(m_fd, buffer, size, 0, addr, len);