in reply to Re^2: problem with a blocking recv function over socket
in thread problem with a blocking recv function over socket

have you tried , MSG_DONTWAIT , do not block
http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?recv+2

Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
  • Comment on Re^3: problem with a blocking recv function over socket

Replies are listed 'Best First'.
Re^4: problem with a blocking recv function over socket
by nav1729 (Initiate) on May 13, 2009 at 05:05 UTC

    I have tried that already, in this fashion

    recv(LINK_HNDL, $temp, $size - length($data),MSG_DONTWAIT);

    can you tell me, if the usage is incorrect?
    I am getting following error message
    "Your vendor has not defined Socket macro MSG_DONTWAIT, used at tb_data_lnk.pm line 234."
    I am using perl version v5.8.8 built for MSWin32-x86-multi-thread, this is active perl.

    I have some more observation, like before perl control reaches recv function call, if i switch of the server(board), recv function was not behaving in a blocking manner. but during the perl is waiting on recv function, if i power off server board, it is not coming out of the recv function call