Documentation for method recv

Documentation for method recv, assembled from the following types:

role IO::Socket

From IO::Socket

(IO::Socket) method recv

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

Receive a package and return it, either as a Blob if :bin was passed, or a Str if not. If $elems is supplied, only that many bytes or characters are returned.

Fails if the socket is not connected.