recv
ErrorsCollection

recv

Synthesised documentation from type/IO/Socket

From type/IO/Socket

See Original text in context

method recv(IO::Socket:D: Cool $elems = Inf:$bin)

Receive a packet and return it, either as a Blob if :bin was passed, or a Str if not. Receives up to $elems or 65535 (whichever is smaller) bytes or characters.

Fails if the socket is not connected.