UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data
UDP Error 10014 when sending data UDP Error 10014 when sending data
UDP Error 10014 when sending data
Go Back  Xtreme Visual Basic Talk > > > UDP Error 10014 when sending data


Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2012, 08:17 AM
the master's Avatar
the master the master is offline
Tachikoma
 
Join Date: Mar 2003
Location: Mansfield, UK
Posts: 4,596
Default UDP Error 10014 when sending data


Hi, I'm trying to send UDP packets using the winsock control.

This is literally my entire test program
Code:
Private Sub Form_Load()
    Winsock1.Protocol = sckUDPProtocol
End Sub

Private Sub Command2_Click()
    
    Dim temp(2) As Byte
    
    temp(1) = 0
    
    Winsock1.Close
    Winsock1.RemotePort = 775
    Winsock1.RemoteHost = "127.0.0.1"
    Winsock1.SendData temp()
End Sub
When the IP address is set to 255.255.255.255 (broadcast) then only every other packet is sent.

When the IP address is 192.168.10.1 or 127.0.0.1 then it sends the first time and crashes the app the 2nd time with "Runtime Error 10014. Invalid argument". The error is on the Winsock1.SendData line.

I'm watching the packets using Wireshark. When using a non-broadcast IP the IPv4 checksum is also invalid (0x0000). Not sure if that matters at all.

Can anyone think why I'm getting this error message? According to Micro$oft it can be caused by the length of the data being different from the length value when passing to the windows API. Since the winsock control does all that internally I can't test or fix that though.
__________________
"That which seems simple is often overlooked" ~ me
Halloween 2014 Yard Haunt
Halloween Special FX
Reply With Quote
  #2  
Old 12-11-2012, 04:06 PM
Ancoma Ancoma is offline
Newcomer
 
Join Date: Nov 2012
Location: Lille, France
Posts: 1
Default

Hello, I've recently worked on a small project using UDP and Winsock.
It's quite an unreliable protocol, but it works (I had strange errors 10053 using Win7, though)

Looking at your code, I think you don't need at all the Winsock1.Close command, which is a command used with TCP/IP protocol.
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 Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data UDP Error 10014 when sending data
UDP Error 10014 when sending data
UDP Error 10014 when sending data
 
UDP Error 10014 when sending data
UDP Error 10014 when sending data
 
-->