Lines Matching refs:m_fd
522 m_fd = INVALID_SOCKET;
552 ensure we get the right behavior, we have gsockosx set m_fd = INVALID_SOCKET
557 if(m_fd != INVALID_SOCKET)
558 close(m_fd);
559 m_fd = INVALID_SOCKET;
567 if (m_fd != INVALID_SOCKET)
595 if (m_fd != INVALID_SOCKET)
597 shutdown(m_fd, 1);
629 if ((m_fd != INVALID_SOCKET && !m_server))
683 if (m_fd == INVALID_SOCKET)
689 if (getsockname(m_fd, &addr, (WX_SOCKLEN_T *) &size) < 0)
744 if (m_fd != INVALID_SOCKET)
762 m_fd = socket(m_local->m_realfamily, SOCK_STREAM, 0);
764 if (m_fd == INVALID_SOCKET)
772 setsockopt(m_fd, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&arg, sizeof(arg));
775 ioctl(m_fd, FIONBIO, &arg);
783 setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(arg));
785 setsockopt(m_fd, SOL_SOCKET, SO_REUSEPORT, (const char*)&arg, sizeof(arg));
793 if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) ||
794 (getsockname(m_fd,
797 (listen(m_fd, 5) != 0))
830 if (m_fd == INVALID_SOCKET || !m_server)
853 connection->m_fd = accept(m_fd, &from, (WX_SOCKLEN_T *) &fromlen);
858 if (connection->m_fd == INVALID_SOCKET)
891 ioctl(connection->m_fd, FIONBIO, (char*)&arg, sizeof(arg));
893 ioctl(connection->m_fd, FIONBIO, &arg);
903 if (this && m_fd == INVALID_SOCKET)
948 if (m_fd != INVALID_SOCKET)
966 m_fd = socket(m_peer->m_realfamily,
969 if (m_fd == INVALID_SOCKET)
977 setsockopt(m_fd, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&arg, sizeof(arg));
981 ioctl(m_fd, FIONBIO, (char*)&arg, sizeof(arg));
983 ioctl(m_fd, FIONBIO, &arg);
989 setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(arg));
991 setsockopt(m_fd, SOL_SOCKET, SO_REUSEPORT, (const char*)&arg, sizeof(arg));
998 if (bind(m_fd, m_local->m_addr, m_local->m_len) < 0)
1007 ret = connect(m_fd, m_peer->m_addr, m_peer->m_len);
1042 getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*) &error, &len);
1095 if (m_fd != INVALID_SOCKET)
1112 m_fd = socket(m_local->m_realfamily, SOCK_DGRAM, 0);
1114 if (m_fd == INVALID_SOCKET)
1120 ioctl(m_fd, FIONBIO, (char*)&arg, sizeof(arg));
1122 ioctl(m_fd, FIONBIO, &arg);
1128 setsockopt(m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(arg));
1130 setsockopt(m_fd, SOL_SOCKET, SO_REUSEPORT, (const char*)&arg, sizeof(arg));
1137 if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) ||
1138 (getsockname(m_fd,
1159 if (m_fd == INVALID_SOCKET || m_server)
1222 if (m_fd == INVALID_SOCKET || m_server)
1292 if (m_fd == -1)
1302 wxFD_SET(m_fd, &readfds);
1304 wxFD_SET(m_fd, &writefds);
1305 wxFD_SET(m_fd, &exceptfds);
1321 if (select(m_fd + 1, &readfds, &writefds, &exceptfds, &tv) <= 0)
1328 if (wxFD_ISSET(m_fd, &exceptfds))
1338 if (wxFD_ISSET(m_fd, &readfds))
1353 if (wxFD_ISSET(m_fd, &writefds))
1362 getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);
1501 if (getsockopt(m_fd, level, optname, (char*)optval, (SOCKOPTLEN_T*)optlen) == 0)
1510 if (setsockopt(m_fd, level, optname, (const char*)optval, optlen) == 0)
1543 if ( m_fd == INVALID_SOCKET )
1561 wxFD_SET(m_fd, &readfds);
1562 ret = select(m_fd + 1, &readfds, NULL, NULL, &tv);
1604 wxFD_SET(m_fd, &writefds);
1605 ret = select(m_fd + 1, NULL, &writefds, NULL, &tv);
1624 if ( ! wxFD_ISSET(m_fd, &writefds) )
1646 ret = recv(m_fd, buffer, size, GSOCKET_MSG_NOSIGNAL);
1664 ret = recvfrom(m_fd, buffer, size, 0, &from, (WX_SOCKLEN_T *) &fromlen);
1702 ret = send(m_fd, (char *)buffer, size, GSOCKET_MSG_NOSIGNAL);
1734 ret = sendto(m_fd, (char *)buffer, size, 0, addr, len);
1751 if (m_fd == INVALID_SOCKET)
1768 int num = recv(m_fd, &c, 1, MSG_PEEK | GSOCKET_MSG_NOSIGNAL);
1831 getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);