UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet
UDP Winsock skips every other packet UDP Winsock skips every other packet
UDP Winsock skips every other packet
Go Back  Xtreme Visual Basic Talk > > > UDP Winsock skips every other packet


Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2014, 09:59 AM
the master's Avatar
the master the master is offline
Tachikoma
 
Join Date: Mar 2003
Location: Mansfield, UK
Posts: 4,596
Default UDP Winsock skips every other packet


Hi, I have a UDP Winsock control that sends 3 bytes of data every 10 seconds. The problem is that every 2nd packet doesn't get sent.

Code:
Private Sub Form_Load()

    sckCom.Bind 775
End Sub

Private Sub tmrPing_Timer()
    
    Dim temp() As Byte
    
    ReDim temp(2)
    temp(0) = 1
    temp(1) = 0
    temp(2) = 0
    
    sckCom.RemotePort = 775
    sckCom.RemoteHost = "192.168.0.150"
    sckCom.SendData temp()
End Sub
I've added a break point and can confirm the timer is definitely firing every 10 seconds.
I'm using Wireshark on the same PC to check the packets and it shows that packets are only going out every 20 seconds.
Even if I use a breakpoint to delay the 2nd packet it still won't send.
The state is always 1 (sckOpen) right before .SendData is called
The Winsock control is receiving all data sent to it without a problem.

Is there something I need to do to "reset" the socket or it's buffers between sends?
__________________
"That which seems simple is often overlooked" ~ me
Halloween 2014 Yard Haunt
Halloween Special FX
Reply With Quote
  #2  
Old 01-08-2015, 01:49 PM
dilettante's Avatar
dilettanteUDP Winsock skips every other packet dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,517
Default

Weird one. Working fine here, whether testing within one machine or between two on the same LAN.

The attached Project uses a 5 second Timer, easily adjusted to 10 seconds. I just got bored waiting.


One possibility:

The Winsock control had many little glitches when it came out and they only got fixed a few at a time. Make sure you have VB6 SP6 installed to get the most bug-free version. SP5 and earlier just don't cut the mustard.
Attached Files
File Type: zip UDP PingPong.zip (2.7 KB, 9 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet UDP Winsock skips every other packet
UDP Winsock skips every other packet
UDP Winsock skips every other packet
 
UDP Winsock skips every other packet
UDP Winsock skips every other packet
 
-->