Пример #1
0
	def accept(self):
		self.handle.listen(self.backlog, Watcher())
		guvnor.switch()

		client = socket()
	 	self.handle.accept(client.handle)
		return client
Пример #2
0
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()
Пример #3
0
def getnameinfo(sockaddr, flags):
	guvnor.dns.getnameinfo(*args, **kwargs)
	return guvnor.switch()
Пример #4
0
def gethostbyaddr(ip_address):
	guvnor.dns.gethostbyaddr(ip_address, Watcher())
	return guvnor.switch()
Пример #5
0
def gethostbyname(hostname):
	guvnor.dns.gethostbyname(hostname, Watcher())
	return guvnor.switch()
Пример #6
0
	def close(self):
		_real.socket.close(self)
		self.handle.close(Watcher())
		guvnor.switch()