f



Increase Winsock (receive) buffer UDP

Hi community,

I have some (embedded) device sending UDP packets over GigE to a Win7 PC. E=
ach UDP packet has a size of 8KB (payload). A burts of 180 UDP packets is t=
ransmitted every 60ms. Within this burst 180 packets are sent every 83.3=B5=
s. This roughly translates to a peak data transfer rate of about 750Mbps an=
d an average data transfer rate of about 187.5Mbps, nothing out of the ordi=
nary one should think.

I thoroughly analyzed the network traffic with Wireshark and confirmed that=
 every UDP packet is received by the PC side!

At a first step I'm just trying to use winscock to receive the data and pla=
ce it to some (user mode) buffer.

But whatever I try, winsock seems to lose about every fourth UDP packet!

This is what I tried so far:

Created a socket with SOCK_DGRAM and IPPROTO_UDP.

I tried to increase the socket's receive buffer size (SO_RCVBUF) with setso=
ckopt. I checked that the desired size was successfully written with getsoc=
kopt. I even tried to set the receive buffer size to the numerical maximum =
of int. Whatever value I set for the receive buffer size: it has no apparen=
t effect, still every fourth packet is lost.

I tried (almost) all models winsock has to offer, starting from polling mod=
e and recv, over to the the overlapped I/O model with completion (callback)=
 routines. I used WSARecv with multiple buffers, I even tried the completio=
n port model and overlapped I/O with multi-threading. It's always the same:=
 about every fourth packet is lost.

From what I learned I'd say that winsock can't handle multiple buffers in u=
dp, datagram socket mode.

Anybody any ideas? Hints? Experience?

Thanks a lot in advance!
0
garelli75
2/26/2014 12:19:56 PM
comp.win.tools.winsock 400 articles. 0 followers. Post Follow

0 Replies
335 Views

Similar Articles

[PageSpeed] 56

Reply:

Similar Artilces:

Winsock
All, In regards to the call below, I was wondering why is it that the 'szMessage' receiving buffer results in an empty one, but by printing 'ret' it indicates the number of bytes I am indeed receiving! int ret = recvfrom(receivingSocket,szMessage,sizeof(szMessage),0,sockaddr*)&addr_Cli, &clilen); Any ideas? Thank you and regards! -Ramiro "Ramiro Barbosa, Jr." <ramiro_b@yahoo.com> wrote... > In regards to the call below, I was wondering why is it that the > 'szMessage' receiving buffer results in an empty one, but by printing > '...

how to receive udp multicasting packets with winsock control?
Subject say it. Ie I have a network adapter that has UDP multicasting packets coming in with destination addresses in the 224.x.x.x range. I'm trying to receive this data with the winsock control in either VB5 or VB6. I set up the control as a UDP control, but no matter what I set for parameters, the dataarrival event never fires, even though I can see packets coming in using a freeware program I found. It seems like unless the packets have the IP address of my host computer, that winsock seems to ignore them, and windows won't let me change the IP# of the adapter to the...

Winsock ActiveX to Winsock API ?
Hello, I use winsock ActiveX in my application. set property Winsock->RemotePort Winsock->RemoteHost call Winsock->Connect and Winsock->SendData and received data through "DataArrival event" my problem is : in windows 7 there no winsock activeX. That's a trouble for me. Because that reason i want to use winsock API instead of Winsock ActiveX. In winsock i found nothing to show me the event DataArrival. Did i need to call recv until there are error code return ? Thanks! On Mar 25, 10:58=A0pm, "Nhat Dung" <nhatd...@hotmail...

winsock
Dear Group, i would like to explain me if you could how i cold make a server in visual basic with multiplt sockets. I use the included winsock compoment. I would like to load about 100 free socket. Any ideas? On Mon, 7 Feb 2005 10:06:07 +0200, "������ ������������" <pappaskostas@ath.forthnet.gr> you typed some letters in random order: >Dear Group, > >i would like to explain me if you could how i cold make a server in visual >basic with multiplt sockets. I use the included winsock compoment. I would >like to load about 100 free socket. Any ideas...

WinSock
I've been searching for a while now and can't find anything that actually seems related. In the same game as my previous post about CreateFile() (which was resolved, by the way), it now can't get past a WinSock initialization. It's returning the error code 10009 (for a bad file descriptor or some such). Any ideas would be GREATLY appreciated!!! Game: http://www.ezaccess.net/ognet On May 20, 11:54 pm, notch....@gmail.com wrote: > I've been searching for a while now and can't find anything that > actually seems related. In the same game as my previous...

Winsock
Hello! Can someone tell me is it possible to use Winsock control in Access? If yes please post some examples or web adresses where to find more information. Thank you! Thank you! "TC" <a@b.c.d> wrote in message news:1064232824.878783@teuthos... > If you go to groups.google.com, click Advanced Groups Search, type *access* > into the newsgroups box, and winsock into the "all words" box, you will find > 1920 entries ... > > HTH, > TC > > > "Schuco" <schuco@pituljica.com> wrote in message > news:bkmekr$nta$1@ls219.htnet....

Winsock
Hello all i need a solution to the following problem I have an application which listens to a port for incoming connections from a client via a Winsock. let's call this Winsock1 Upon a connection of a client i would like the application to call an ActiveX.exe which also has a Winsock Control (Winsock2), and i would like to transfer the Winsock1 information to Winsock2, hence allowing the client now to talk directly to the Winsock2 on the ActiveX control, and hence freeing up the Winsock1 to start listening again. And if another client connects then i would like the same to happen again...

WinSock
Hello! Does anyone know where to find SDK for WinSock library? Thanks! Dummy wrote: > Does anyone know where to find SDK for WinSock library? Why not just use the BSD like sockets that come as standard with the MSVC++ compiler? For example something like this should compile fine using the standard Windows SDK that comes with MSVC++: #include <windows.h> int test() { WSAStartup(wVersion, &wsaData); int sockfd = socket(AF_INET, SOCK_STREAM, 0); closesocket(sockfd); WSACleanup(); } If you do not have MSVC++ t...

WinSock
Hi, I'm writing app where I use WinSock, but I have experienced a problem. WinSock only sends the data after finishing the calling sub/function. Can I force WinSock immediately as I need to send several packets but they have to be sent separate? Many thanks Niels Borg "Niels Borg" <nbborg@hotmail.com> wrote in message news:3f15451f$0$32493$edfadb0f@dread16.news.tele.dk > Hi, > > I'm writing app where I use WinSock, but I have experienced a problem. > WinSock only sends the data after finishing the calling sub/function. > Can I force WinSock immediate...

winsock
What does the parameter AF_INET mean? It is part of one of the SDK functions. Bill Bill Cunningham wrote: > What does the parameter AF_INET mean? It is part of one of > the SDK functions. The AF_INET is just a #define used to set the sin_family member which is part of the sockaddr_in structure. For example here is some code that sets up the sockaddr_in structure for a given host name: char *host_name; // "www.zeuseit.com" or "255.64.25.10" etc; struct sockaddr_in server; //-- check for a raw IP address if (isdigit(ho...

Winsock
What's the 3rd party add-on market these days for winsock controls? Has to run with 6.0 since I'm an old fart :) Paul SGksDQoNCkNoZWNrIENhdGFseXN0IFNvY2tldFRvb2xzDQpodHRwOi8va2xhcmlzb2Z0LmNvbS9L U05ld3NfMTk2Lmh0bQ0KDQpMZW9uaWQgQ2h1ZGFrb3YNCmNodWRha292QGtsYXJpc29mdC5jb20N Cg0K0LLRgtC+0YDQvdC40LosIDMwINGB0LXQvdGC0Y/QsdGA0Y8gMjAxNMKg0LMuLCA0OjEwOjIy IFVUQys0INC/0L7Qu9GM0LfQvtCy0LDRgtC10LvRjCBjbGFja21hbm5hbiDQvdCw0L/QuNGB0LDQ uzoNCj4gV2hhdCdzIHRoZSAzcmQgcGFydHkgYWRkLW9uIG1hcmtldCB0aGVzZSBkYXlzIGZvciB3 aW5zb2NrIGNvbnRyb2xzPw0KPiANCj4gSGFzIHRvIHJ1biB3aXRoIDYuMCBzaW5jZSBJJ20gYW4g ...

winsock under win 2000
hellow all. i have server client vb program thet use winsock. when the server is running under win 2000 i get from some clients, not all, un complited string. i dont whant to change things in the client side. only in the server side. is there a solution? thanks. ...

UDP multicast problem with winsock
Apologies in advance if this newsgroup is considered not relevent, if so please suggest one that is. I have a situation where i need to receive UDP multicasts on a computer that has multiple network cards. The problem i am experiencing is that the udp packets are arriving on the network card of interest (i have run a network analysis application to verify this) but something is blocking the data from arriving on the open socket. Following the advice from an older post i have run TDIMon.exe also and can confirm that the 'TDI_EVENT_RECEIVE_DATAGRAM' message is not reported whe...

winsock problem under win 2000
hellow all. i have server client vb program thet use winsock. when the server is running under win 2000 i get from some clients, not all, un complited string. i dont whant to change things in the client side. only in the server side. is there a solution? thanks. ...

Web resources about - Increase Winsock (receive) buffer UDP - comp.win.tools.winsock

Increase Mather - Wikipedia, the free encyclopedia
Increase Mather (June 21, 1639 O.S. – August 23, 1723 O.S.) was a major figure in the early history of the Massachusetts Bay Colony and Province ...

Facebook Increases Type Size In News Feed
Facebook slightly increased the type size for user names and text in wall posts in the news feed for some users, making them a little easier ...

Increase Online Sales - Facebook for Business
Use Facebook to find new customers and build deep relationships with people who’ll click through and buy.

Facebook Increases Number of Visible Tab Apps on Pages, Changes Tab Reordering
Facebook has increased the number of tab applications that are visible above the fold in the navigation menu of Facebook Pages. It also now only ...

faroo_p2p: Six month after launch the FAROO Search API http://t.co/RQlyOBZC serves 24 million queries/month ...
faroo_p2p: Six month after launch the FAROO Search API http://t.co/RQlyOBZC serves 24 million queries/month. A tenfold increase in the last month. ...

Working to increase #transparency: Our latest report - Twitter Blogs
A lot has happened in the data privacy space since the release of our last #transparency report back in January. As we’ve noted, we believe the ...

Five ways to increase your work fitness
After the holidays, when we could move more organically, we're slowly settling back into (or resisting) the rhythm of work and the year ahead. ...

What's behind the avocado price increase?
Australia's summer avocado supply shortage is largely the result of market manipulation to boost sales before Christmas, says Antony Allen, former ...

Motion Picture Academy Adopts New Rules to Increase Diversity
The Academy of Motion Pictures Arts & Sciences, reacting to criticism over its all-white slate of actor nominees this year, is taking steps to ...

How does Twitter keep missing this obvious opportunity to increase revenue?
I don't get it. Twitter's stock has suffered from a cascading series of meltdowns since its IPO (see chart, below) as its revenue, growth in ...

Resources last updated: 1/28/2016 6:36:01 AM