def accept(self): self.handle.listen(self.backlog, Watcher()) guvnor.switch() client = socket() self.handle.accept(client.handle) return client
def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0): guvnor.dns.getaddrinfo(host, Watcher(), port, family, type, proto, flags) return guvnor.switch()
def getnameinfo(sockaddr, flags): guvnor.dns.getnameinfo(*args, **kwargs) return guvnor.switch()
def gethostbyaddr(ip_address): guvnor.dns.gethostbyaddr(ip_address, Watcher()) return guvnor.switch()
def gethostbyname(hostname): guvnor.dns.gethostbyname(hostname, Watcher()) return guvnor.switch()
def close(self): _real.socket.close(self) self.handle.close(Watcher()) guvnor.switch()