changeset 49:101e0e455e8f

stubs Ignore-this: 42f270f3b817541e2b87a7b0b234ccf1
author Drew Perttula <drewp@bigasterisk.com>
date Mon, 27 May 2019 23:07:24 +0000
parents 7c3cd440619b
children a7a25bfc3005
files stubs/twisted/internet/interfaces.pyi
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/twisted/internet/interfaces.pyi	Mon May 27 23:07:24 2019 +0000
@@ -0,0 +1,20 @@
+from typing import Any
+
+class IDelayedCall:
+    def getTime(self) -> Any: ...
+    def cancel(self) -> None: ...
+    def delay(self, secondsLater: Any) -> None: ...
+    def reset(self, secondsFromNow: Any) -> None: ...
+    def active(self) -> None: ...
+
+
+class IAddress:  # this is https://twistedmatrix.com/documents/current/api/twisted.internet.address.IPv4Address.html
+    type: str
+    host: str
+    port: int   
+    
+class IListeningPort:
+    def startListening(self): ...
+    def stopListening(self): ... # returns deferred
+    def getHost(self) -> IAddress: ...
+    _realPortNumber: int # from t.i.tcp.Port