Lines Matching refs:sock_fd
544 #define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0)
668 if (ioctl(s->sock_fd, FIONBIO, (unsigned int *)&block) == -1)
671 delay_flag = fcntl(s->sock_fd, F_GETFL, 0);
679 if (fcntl(s->sock_fd, F_SETFL, new_delay_flag) == -1)
684 if (ioctlsocket(s->sock_fd, FIONBIO, &arg) != 0)
724 if (s->sock_fd == INVALID_SOCKET)
730 pollfd.fd = s->sock_fd;
756 FD_SET(s->sock_fd, &fds);
763 FD_SET(s->sock_fd, &efds);
769 n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
772 n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
949 s->sock_fd = fd;
1909 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
2024 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
2069 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
2129 if (ioctl(s->sock_fd, CTLIOCGINFO, &info)) {
2499 ctx->result = accept4(s->sock_fd, addr, paddrlen,
2507 ctx->result = accept(s->sock_fd, addr, paddrlen);
2509 ctx->result = accept(s->sock_fd, addr, paddrlen);
2570 addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf),
2779 res = setsockopt(s->sock_fd, level, optname,
2790 res = setsockopt(s->sock_fd, level, optname,
2800 res = setsockopt(s->sock_fd, level, optname,
2819 res = setsockopt(s->sock_fd, level, optname,
2822 res = setsockopt(s->sock_fd, level, optname, optval.buf, optval.len);
2869 res = getsockopt(s->sock_fd, level, optname,
2877 res = getsockopt(s->sock_fd, level, optname,
2898 res = getsockopt(s->sock_fd, level, optname,
2928 res = bind(s->sock_fd, SAS2SA(&addrbuf), addrlen);
2953 fd = s->sock_fd;
2955 s->sock_fd = INVALID_SOCKET;
2981 SOCKET_T fd = s->sock_fd;
2982 s->sock_fd = INVALID_SOCKET;
2999 if (getsockopt(s->sock_fd, SOL_SOCKET, SO_ERROR, (void *)&err, &size)) {
3021 res = connect(s->sock_fd, addr, addrlen);
3137 return PyLong_FromSocket_t(s->sock_fd);
3159 res = getsockname(s->sock_fd, SAS2SA(&addrbuf), &addrlen);
3163 return makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen,
3188 res = getpeername(s->sock_fd, SAS2SA(&addrbuf), &addrlen);
3192 return makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen,
3223 res = listen(s->sock_fd, backlog);
3253 ctx->result = recv(s->sock_fd, ctx->cbuf, (int)ctx->len, ctx->flags);
3255 ctx->result = recv(s->sock_fd, ctx->cbuf, ctx->len, ctx->flags);
3423 ctx->result = recvfrom(s->sock_fd, ctx->cbuf, (int)ctx->len, ctx->flags,
3426 ctx->result = recvfrom(s->sock_fd, ctx->cbuf, ctx->len, ctx->flags,
3470 *addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen,
3600 ctx->result = recvmsg(s->sock_fd, ctx->msg, ctx->flags);
3709 makesockaddr(s->sock_fd, SAS2SA(&addrbuf),
3929 ctx->result = send(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags);
3931 ctx->result = send(s->sock_fd, ctx->buf, ctx->len, ctx->flags);
4068 ctx->result = sendto(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags,
4071 ctx->result = sendto(s->sock_fd, ctx->buf, ctx->len, ctx->flags,
4212 ctx->result = sendmsg(s->sock_fd, ctx->msg, ctx->flags);
4589 res = shutdown(s->sock_fd, how);
4618 if (WSAIoctl(s->sock_fd, cmd, &option, sizeof(option),
4628 if (WSAIoctl(s->sock_fd, cmd, &ka, sizeof(ka),
4638 if (WSAIoctl(s->sock_fd, cmd, &option, sizeof(option),
4670 result = WSADuplicateSocketW(s->sock_fd, processId, &info);
4788 if (s->sock_fd != INVALID_SOCKET) {
4800 fd = s->sock_fd;
4801 s->sock_fd = INVALID_SOCKET;
4826 long sock_fd;
4828 if (s->sock_fd == INVALID_SOCKET) {
4829 sock_fd = -1;
4832 else if (s->sock_fd
4843 sock_fd = (long)s->sock_fd;
4846 sock_fd, s->sock_family,
4861 ((PySocketSockObject *)new)->sock_fd = INVALID_SOCKET;