Method: TCPSocket#recv
- Defined in:
- lib/polyphony/extensions/socket.rb
#recv(maxlen, flags = 0, outbuf = nil) ⇒ String
Receives up to maxlen bytes from the socket. If outbuf is given, it is
used as the buffer to receive into, otherwise a new string is allocated and
used as buffer.
If no bytes are available, this method will block until the socket is ready to receive from.
360 361 362 |
# File 'lib/polyphony/extensions/socket.rb', line 360 def recv(maxlen, flags = 0, outbuf = nil) Polyphony.backend_recv(self, outbuf || +'', maxlen, 0) end |