how to avoid recv() blocking issue?



hi all,

i got a problem with recv().

there's a thread to receive data from a server. periodically this thread has
to stop (to let others to do some work). i created some events to check them
inside the thread. the problem happens, when recv() starts and does not
receive any data from a server. this time the thread is stuck - recv() just
waits for data, and i can't stop the thread well (not using
TerminateThread() - btw, it's not a good idea, because a socket remains
"anchored" by the thread).

is there any way to "unblock" recv() somehow? WSAEventSelect() does not
help. looks like it's for different purposes.

thanks a lot.

--
alex c.


.



Relevant Pages

  • Getting sasldb2 to work
    ... I'd like to use cyrus-sasl-2.1.21 together with Postfix ... I started the sample server: ... recv: ... please enter an authentication id: ...
    (comp.os.linux.networking)
  • Getting sasldb2 to work
    ... I'd like to use cyrus-sasl-2.1.21 together with Postfix ... I started the sample server: ... recv: ... please enter an authentication id: ...
    (comp.os.linux.misc)
  • Re: SFF (Send From File) Utility
    ... SMTP server (and it seems to be working since the message to all 3 ... I'll also post the SMTP configuration with those results this evening. ... recv buf=220 apollo.wakeassoc.com Microsoft ESMTP MAIL Service, ...
    (comp.os.vms)
  • Re: Multiple writes to client socket
    ... >>>>Maybe you need to post the server as well. ... This is not guaranteed on stream sockets -- there's no required ... >>correlation between calls to sendand calls to recv(). ... >>>Its a TCP Stream socket ...
    (comp.unix.programmer)
  • Re: Segmented Data Over Sockets
    ... Just as others explained, if you sendN bytes from the client, it does not ... mean that a single corresponding recv() on the server will receive N bytes. ... each byte of the local structure on the receiving end, ...
    (microsoft.public.win32.programmer.networks)