def recv(self, numbytes):
if self.fatal_error_test:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>elif self.eagain_test:<EOL><INDENT>raise socket.error(socket.errno.EAGAIN, "<STR_LIT>")<EOL><DEDENT>ret = self.to_be_received[:numbytes]<EOL>self.to_be_received = self.to_be_received[numbytes:]<EOL>return ret<EOL>
reads ``numbytes`` from the recv buffer