Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Winsock stops throwing dataarrival events?

Question posted by: Mark (Guest) on January 25th, 2007 05:45 AM
Hi,

I have a VB6 project that uses a winsock control to receive text
messages over a UDP connection.

It used to work fine. However, when I changed the code to make it more
efficient (ie, less processing was done with each received message), the
program has this weird bug where it will stop acting on the messages
received. The program might work fine for a whole day, receiving
thousands of messages, so it is an intermittent problem.

When it does stop responding, the program itself is still responsive to
user inputs, and a log file I wrote indicated that no new messages were
being received. However, if the program is stopped and restarted, the
messages are again processed.

Another winsock control that is listening on port 80 for web requests
also continues to work.

Has anyone encountered this or know of a possible solution?
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Henning's Avatar
Henning
Guest
n/a Posts
January 25th, 2007
12:15 PM
#2

Re: Winsock stops throwing dataarrival events?

"Mark" <mark@eliminatespam.comskrev i meddelandet
news:45b850f5$0$8972$4c368faf@roadrunner.com...
Quote:
Originally Posted by
Hi,
>
I have a VB6 project that uses a winsock control to receive text
messages over a UDP connection.
>
It used to work fine. However, when I changed the code to make it more
efficient (ie, less processing was done with each received message), the
program has this weird bug where it will stop acting on the messages
received. The program might work fine for a whole day, receiving
thousands of messages, so it is an intermittent problem.
>
When it does stop responding, the program itself is still responsive to
user inputs, and a log file I wrote indicated that no new messages were
being received. However, if the program is stopped and restarted, the
messages are again processed.
>
Another winsock control that is listening on port 80 for web requests
also continues to work.
>
Has anyone encountered this or know of a possible solution?


I don't know if this helps, but the Winsock ctrl does not just receive
complete msg's from UDP. There can be partly received msg's in the buffer.

/Henning



Bufozzo's Avatar
Bufozzo
Guest
n/a Posts
January 26th, 2007
05:55 PM
#3

Re: Winsock stops throwing dataarrival events?
I had the same problem.The only way to handle it was to close and re-open
the listening control after some time (maybe 1 hour )


"Mark" <mark@eliminatespam.comescribió en el mensaje
news:45b850f5$0$8972$4c368faf@roadrunner.com...
Quote:
Originally Posted by
Hi,
>
I have a VB6 project that uses a winsock control to receive text messages
over a UDP connection.
>
It used to work fine. However, when I changed the code to make it more
efficient (ie, less processing was done with each received message), the
program has this weird bug where it will stop acting on the messages
received. The program might work fine for a whole day, receiving thousands
of messages, so it is an intermittent problem.
>
When it does stop responding, the program itself is still responsive to
user inputs, and a log file I wrote indicated that no new messages were
being received. However, if the program is stopped and restarted, the
messages are again processed.
>
Another winsock control that is listening on port 80 for web requests also
continues to work.
>
Has anyone encountered this or know of a possible solution?




 
Not the answer you were looking for? Post your question . . .
183,962 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors