1
1
import socket
2
2
import sys
3
- from _typeshed import Incomplete , WriteableBuffer
3
+ from _typeshed import Incomplete , ReadableBuffer , WriteableBuffer
4
4
from collections .abc import Callable
5
5
from typing import IO , Any , ClassVar , NoReturn
6
6
from typing_extensions import Literal
@@ -48,6 +48,12 @@ if sys.platform == "win32":
48
48
def select (self , timeout : int | None = None ) -> list [futures .Future [Any ]]: ...
49
49
def recv (self , conn : socket .socket , nbytes : int , flags : int = 0 ) -> futures .Future [bytes ]: ...
50
50
def recv_into (self , conn : socket .socket , buf : WriteableBuffer , flags : int = 0 ) -> futures .Future [Any ]: ...
51
+ def recvfrom (
52
+ self , conn : socket .socket , nbytes : int , flags : int = 0
53
+ ) -> futures .Future [tuple [bytes , socket ._RetAddress ]]: ...
54
+ def sendto (
55
+ self , conn : socket .socket , buf : ReadableBuffer , flags : int = 0 , addr : socket ._Address | None = None
56
+ ) -> futures .Future [int ]: ...
51
57
def send (self , conn : socket .socket , buf : WriteableBuffer , flags : int = 0 ) -> futures .Future [Any ]: ...
52
58
def accept (self , listener : socket .socket ) -> futures .Future [Any ]: ...
53
59
def connect (
@@ -63,7 +69,7 @@ if sys.platform == "win32":
63
69
if sys .version_info >= (3 , 11 ):
64
70
def recvfrom_into (
65
71
self , conn : socket .socket , buf : WriteableBuffer , flags : int = 0
66
- ) -> tuple [int , socket ._RetAddress ]: ...
72
+ ) -> futures . Future [ tuple [int , socket ._RetAddress ] ]: ...
67
73
SelectorEventLoop = _WindowsSelectorEventLoop
68
74
69
75
class WindowsSelectorEventLoopPolicy (events .BaseDefaultEventLoopPolicy ):
0 commit comments