Lines Matching refs:sock_fd
545 #define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0)
669 if (ioctl(s->sock_fd, FIONBIO, (unsigned int *)&block) == -1) in internal_setblocking()
672 delay_flag = fcntl(s->sock_fd, F_GETFL, 0); in internal_setblocking()
680 if (fcntl(s->sock_fd, F_SETFL, new_delay_flag) == -1) in internal_setblocking()
685 if (ioctlsocket(s->sock_fd, FIONBIO, &arg) != 0) in internal_setblocking()
725 if (s->sock_fd == INVALID_SOCKET) in internal_select()
731 pollfd.fd = s->sock_fd; in internal_select()
768 FD_SET(s->sock_fd, &fds); in internal_select()
775 FD_SET(s->sock_fd, &efds); in internal_select()
781 n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int), in internal_select()
784 n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int), in internal_select()
961 s->sock_fd = fd; in init_sockobject()
2013 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) { in getsockaddrarg()
2138 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) { in getsockaddrarg()
2182 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) { in getsockaddrarg()
2230 if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) { in getsockaddrarg()
2289 if (ioctl(s->sock_fd, CTLIOCGINFO, &info)) { in getsockaddrarg()
2678 ctx->result = accept4(s->sock_fd, addr, paddrlen, in sock_accept_impl()
2686 ctx->result = accept(s->sock_fd, addr, paddrlen); in sock_accept_impl()
2688 ctx->result = accept(s->sock_fd, addr, paddrlen); in sock_accept_impl()
2749 addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf), in sock_accept()
2958 res = setsockopt(s->sock_fd, level, optname, in sock_setsockopt()
2969 res = setsockopt(s->sock_fd, level, optname, in sock_setsockopt()
2979 res = setsockopt(s->sock_fd, level, optname, in sock_setsockopt()
2998 res = setsockopt(s->sock_fd, level, optname, in sock_setsockopt()
3001 res = setsockopt(s->sock_fd, level, optname, optval.buf, optval.len); in sock_setsockopt()
3048 res = getsockopt(s->sock_fd, level, optname, in sock_getsockopt()
3056 res = getsockopt(s->sock_fd, level, optname, in sock_getsockopt()
3077 res = getsockopt(s->sock_fd, level, optname, in sock_getsockopt()
3113 res = bind(s->sock_fd, SAS2SA(&addrbuf), addrlen); in sock_bind()
3138 fd = s->sock_fd; in sock_close()
3140 s->sock_fd = INVALID_SOCKET; in sock_close()
3166 SOCKET_T fd = s->sock_fd; in sock_detach()
3167 s->sock_fd = INVALID_SOCKET; in sock_detach()
3184 if (getsockopt(s->sock_fd, SOL_SOCKET, SO_ERROR, (void *)&err, &size)) { in sock_connect_impl()
3206 res = connect(s->sock_fd, addr, addrlen); in internal_connect()
3332 return PyLong_FromSocket_t(s->sock_fd); in sock_fileno()
3354 res = getsockname(s->sock_fd, SAS2SA(&addrbuf), &addrlen); in sock_getsockname()
3358 return makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, in sock_getsockname()
3384 res = getpeername(s->sock_fd, SAS2SA(&addrbuf), &addrlen); in sock_getpeername()
3388 return makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, in sock_getpeername()
3419 res = listen(s->sock_fd, backlog); in sock_listen()
3449 ctx->result = recv(s->sock_fd, ctx->cbuf, (int)ctx->len, ctx->flags); in sock_recv_impl()
3451 ctx->result = recv(s->sock_fd, ctx->cbuf, ctx->len, ctx->flags); in sock_recv_impl()
3619 ctx->result = recvfrom(s->sock_fd, ctx->cbuf, (int)ctx->len, ctx->flags, in sock_recvfrom_impl()
3622 ctx->result = recvfrom(s->sock_fd, ctx->cbuf, ctx->len, ctx->flags, in sock_recvfrom_impl()
3666 *addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen, in sock_recvfrom_guts()
3796 ctx->result = recvmsg(s->sock_fd, ctx->msg, ctx->flags); in sock_recvmsg_impl()
3905 makesockaddr(s->sock_fd, SAS2SA(&addrbuf), in sock_recvmsg_guts()
4125 ctx->result = send(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags); in sock_send_impl()
4127 ctx->result = send(s->sock_fd, ctx->buf, ctx->len, ctx->flags); in sock_send_impl()
4264 ctx->result = sendto(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags, in sock_sendto_impl()
4267 ctx->result = sendto(s->sock_fd, ctx->buf, ctx->len, ctx->flags, in sock_sendto_impl()
4412 ctx->result = sendmsg(s->sock_fd, ctx->msg, ctx->flags); in sock_sendmsg_impl()
4799 res = shutdown(s->sock_fd, how);
4828 if (WSAIoctl(s->sock_fd, cmd, &option, sizeof(option),
4838 if (WSAIoctl(s->sock_fd, cmd, &ka, sizeof(ka),
4848 if (WSAIoctl(s->sock_fd, cmd, &option, sizeof(option),
4880 result = WSADuplicateSocketW(s->sock_fd, processId, &info);
4998 if (s->sock_fd != INVALID_SOCKET) {
5010 fd = s->sock_fd;
5011 s->sock_fd = INVALID_SOCKET;
5036 long sock_fd; local
5038 if (s->sock_fd == INVALID_SOCKET) {
5039 sock_fd = -1;
5042 else if (s->sock_fd > LONG_MAX) {
5053 sock_fd = (long)s->sock_fd;
5056 sock_fd, s->sock_family,
5071 ((PySocketSockObject *)new)->sock_fd = INVALID_SOCKET;