GreenSocket: added recv_into and recvfrom_into methods

This commit is contained in:
Denis Bilenko
2008-10-07 17:13:01 +07:00
parent 376e15ed39
commit 4cbaeeab63

View File

@@ -308,10 +308,17 @@ class GreenSocket(object):
if not self.act_non_blocking:
trampoline(self.fd, read=True, timeout=self.gettimeout(), timeout_exc=socket.timeout)
return self.fd.recvfrom(*args)
# TODO recvfrom_into
# TODO recv_into
def recvfrom_into(self, *args):
if not self.act_non_blocking:
trampoline(self.fd, read=True, timeout=self.gettimeout(), timeout_exc=socket.timeout)
return self.fd.recvfrom_into(*args)
def recv_into(self, *args):
if not self.act_non_blocking:
trampoline(self.fd, read=True, timeout=self.gettimeout(), timeout_exc=socket.timeout)
return self.fd.recv_into(*args)
send = higher_order_send(socket_send)
def sendall(self, data):