comparison stubs/twisted/internet/protocol.pyi @ 1863:0f0ff27e55a3

stubs, mostly autogen or empty Ignore-this: bc70818d2bc92bf022c65c3572b9775e
author Drew Perttula <drewp@bigasterisk.com>
date Sat, 25 May 2019 12:01:26 +0000
parents
children
comparison
equal deleted inserted replaced
1862:d92757c88817 1863:0f0ff27e55a3
1 # Stubs for twisted.internet.protocol (Python 3)
2 #
3 # NOTE: This dynamically typed stub was automatically generated by stubgen.
4
5 from twisted.python import components
6 from typing import Any, Optional
7
8 class Factory:
9 protocol: Any = ...
10 numPorts: int = ...
11 noisy: bool = ...
12 @classmethod
13 def forProtocol(cls, protocol: Any, *args: Any, **kwargs: Any): ...
14 def logPrefix(self): ...
15 def doStart(self) -> None: ...
16 def doStop(self) -> None: ...
17 def startFactory(self) -> None: ...
18 def stopFactory(self) -> None: ...
19 def buildProtocol(self, addr: Any): ...
20
21 class ClientFactory(Factory):
22 def startedConnecting(self, connector: Any) -> None: ...
23 def clientConnectionFailed(self, connector: Any, reason: Any) -> None: ...
24 def clientConnectionLost(self, connector: Any, reason: Any) -> None: ...
25
26 class _InstanceFactory(ClientFactory):
27 noisy: bool = ...
28 pending: Any = ...
29 reactor: Any = ...
30 instance: Any = ...
31 deferred: Any = ...
32 def __init__(self, reactor: Any, instance: Any, deferred: Any) -> None: ...
33 def buildProtocol(self, addr: Any): ...
34 def clientConnectionFailed(self, connector: Any, reason: Any) -> None: ...
35 def fire(self, func: Any, value: Any) -> None: ...
36
37 class ClientCreator:
38 reactor: Any = ...
39 protocolClass: Any = ...
40 args: Any = ...
41 kwargs: Any = ...
42 def __init__(self, reactor: Any, protocolClass: Any, *args: Any, **kwargs: Any) -> None: ...
43 def connectTCP(self, host: Any, port: Any, timeout: int = ..., bindAddress: Optional[Any] = ...): ...
44 def connectUNIX(self, address: Any, timeout: int = ..., checkPID: bool = ...): ...
45 def connectSSL(self, host: Any, port: Any, contextFactory: Any, timeout: int = ..., bindAddress: Optional[Any] = ...): ...
46
47 class ReconnectingClientFactory(ClientFactory):
48 maxDelay: int = ...
49 initialDelay: float = ...
50 factor: float = ...
51 jitter: float = ...
52 delay: Any = ...
53 retries: int = ...
54 maxRetries: Any = ...
55 connector: Any = ...
56 clock: Any = ...
57 continueTrying: int = ...
58 def clientConnectionFailed(self, connector: Any, reason: Any) -> None: ...
59 def clientConnectionLost(self, connector: Any, unused_reason: Any) -> None: ...
60 def retry(self, connector: Optional[Any] = ...) -> None: ...
61 def stopTrying(self) -> None: ...
62 def resetDelay(self) -> None: ...
63
64 class ServerFactory(Factory): ...
65
66 class BaseProtocol:
67 connected: int = ...
68 transport: Any = ...
69 def makeConnection(self, transport: Any) -> None: ...
70 def connectionMade(self) -> None: ...
71
72 connectionDone: Any
73
74 class Protocol(BaseProtocol):
75 def logPrefix(self): ...
76 def dataReceived(self, data: Any) -> None: ...
77 def connectionLost(self, reason: Any) -> None: ...
78
79 class ProtocolToConsumerAdapter(components.Adapter):
80 def write(self, data: Any) -> None: ...
81 def registerProducer(self, producer: Any, streaming: Any) -> None: ...
82 def unregisterProducer(self) -> None: ...
83
84 class ConsumerToProtocolAdapter(components.Adapter):
85 def dataReceived(self, data: Any) -> None: ...
86 def connectionLost(self, reason: Any) -> None: ...
87 def makeConnection(self, transport: Any) -> None: ...
88 def connectionMade(self) -> None: ...
89
90 class ProcessProtocol(BaseProtocol):
91 def childDataReceived(self, childFD: Any, data: Any) -> None: ...
92 def outReceived(self, data: Any) -> None: ...
93 def errReceived(self, data: Any) -> None: ...
94 def childConnectionLost(self, childFD: Any) -> None: ...
95 def inConnectionLost(self) -> None: ...
96 def outConnectionLost(self) -> None: ...
97 def errConnectionLost(self) -> None: ...
98 def processExited(self, reason: Any) -> None: ...
99 def processEnded(self, reason: Any) -> None: ...
100
101 class AbstractDatagramProtocol:
102 transport: Any = ...
103 numPorts: int = ...
104 noisy: bool = ...
105 def doStart(self) -> None: ...
106 def doStop(self) -> None: ...
107 def startProtocol(self) -> None: ...
108 def stopProtocol(self) -> None: ...
109 def makeConnection(self, transport: Any) -> None: ...
110 # def datagramReceived(self, datagram: Any, addr: Any) -> None: ...
111
112 class DatagramProtocol(AbstractDatagramProtocol):
113 def logPrefix(self): ...
114 def connectionRefused(self) -> None: ...
115
116 class ConnectedDatagramProtocol(DatagramProtocol):
117 # def datagramReceived(self, datagram: Any) -> None: ...
118 def connectionFailed(self, failure: Any) -> None: ...
119
120 class FileWrapper:
121 closed: int = ...
122 disconnecting: int = ...
123 producer: Any = ...
124 streamingProducer: int = ...
125 file: Any = ...
126 def __init__(self, file: Any) -> None: ...
127 def write(self, data: Any) -> None: ...
128 def registerProducer(self, producer: Any, streaming: Any) -> None: ...
129 def unregisterProducer(self) -> None: ...
130 def stopConsuming(self) -> None: ...
131 def writeSequence(self, iovec: Any) -> None: ...
132 def loseConnection(self) -> None: ...
133 def getPeer(self): ...
134 def getHost(self): ...
135 def handleException(self) -> None: ...
136 def resumeProducing(self) -> None: ...
137 def pauseProducing(self) -> None: ...
138 def stopProducing(self) -> None: ...