I find at least 3 ways to read from a nonblocking socket in perl
$socket->recv
$socket->sysread
POSIX::read($socket,...
looks like 3 different names to the same thing, I read the documentations but I can’t find one huge differente. anyone?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
sysreadis stream (TCP) oriented (it doesn’t care about where one send ends and another begins), andrecvis datagram (UDP) oriented (it does care).POSIX::readworks on file descriptors, whereassysreadworks on file handles.