[pypy-svn] r58654 - pypy/branch/2.5-merge/pypy/rlib

fijal at codespeak.net fijal at codespeak.net
Mon Oct 6 15:34:50 CEST 2008


Author: fijal
Date: Mon Oct  6 15:34:50 2008
New Revision: 58654

Modified:
   pypy/branch/2.5-merge/pypy/rlib/rsocket.py
Log:
oops, forgot to check it in in last commit


Modified: pypy/branch/2.5-merge/pypy/rlib/rsocket.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/rlib/rsocket.py	(original)
+++ pypy/branch/2.5-merge/pypy/rlib/rsocket.py	Mon Oct  6 15:34:50 2008
@@ -825,6 +825,7 @@
     def recvinto(self, rwbuffer, nbytes, flags=0):
         buf = self.recv(nbytes, flags)
         rwbuffer.setslice(0, buf)
+        return len(buf)
 
     def recvfrom(self, buffersize, flags=0):
         """Like recv(buffersize, flags) but also return the sender's
@@ -855,6 +856,11 @@
                 rffi.keep_buffer_alive_until_here(raw_buf, gc_buf)
         raise self.error_handler()
 
+    def recvfrom_into(self, rwbuffer, nbytes, flags=0):
+        buf, addr = self.recvfrom(nbytes, flags)
+        rwbuffer.setslice(0, buf)
+        return len(buf), addr        
+
     def send_raw(self, dataptr, length, flags=0):
         """Send data from a CCHARP buffer."""
         res = -1



More information about the Pypy-commit mailing list