Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Winsock stops throwing dataarrival events?
Old
  (#1)
Mark
Guest
 
Posts: n/a
Default Winsock stops throwing dataarrival events? - 06-04-2007, 10:35 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?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Winsock stops throwing dataarrival events?
Old
  (#2)
Henning
Guest
 
Posts: n/a
Default Re: Winsock stops throwing dataarrival events? - 06-04-2007, 10:35 AM


"Mark" <EMAIL REMOVED> skrev i meddelandet
news:45b850f5$0$8972$EMAIL REMOVED...
> 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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Winsock stops throwing dataarrival events?
Old
  (#3)
Bufozzo
Guest
 
Posts: n/a
Default Re: Winsock stops throwing dataarrival events? - 06-04-2007, 10:35 AM

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" <EMAIL REMOVED> escribió en el mensaje
news:45b850f5$0$8972$EMAIL REMOVED...
> 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?



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top