예제 #1
0
파일: socket.py 프로젝트: colinmarc/guvnor
	def accept(self):
		self.handle.listen(self.backlog, Watcher())
		guvnor.switch()

		client = socket()
	 	self.handle.accept(client.handle)
		return client
예제 #2
0
파일: socket.py 프로젝트: colinmarc/guvnor
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
파일: socket.py 프로젝트: colinmarc/guvnor
def getnameinfo(sockaddr, flags):
	guvnor.dns.getnameinfo(*args, **kwargs)
	return guvnor.switch()
예제 #4
0
파일: socket.py 프로젝트: colinmarc/guvnor
def gethostbyaddr(ip_address):
	guvnor.dns.gethostbyaddr(ip_address, Watcher())
	return guvnor.switch()
예제 #5
0
파일: socket.py 프로젝트: colinmarc/guvnor
def gethostbyname(hostname):
	guvnor.dns.gethostbyname(hostname, Watcher())
	return guvnor.switch()
예제 #6
0
파일: socket.py 프로젝트: colinmarc/guvnor
	def close(self):
		_real.socket.close(self)
		self.handle.close(Watcher())
		guvnor.switch()