> From: SiliconBear [mailto:c...@ecafe.idv.tw] > > Dear Experts, > > I'm trying to port a simple UDP application, which ran on Linux and > Symbian, > to Windows Mobile 6.5. I was going to do a fresh MSVC project, but then > ran > into cegcc, and gave it a try. I have to say, cegcc saves me a lot of > efforts. > However, I ran into an issue with missing UDP packets, details are > given below. > > I use arm-ming32ce on Linux, and have revised my code to get it > compiled. More > specifically, I commented out a few BSD socket headers, and add the > following > includes: > #define __USE_WIN32_SOCKETS > #include<winsock.h> > #include<windows.h> > #include<string.h> > #include<process.h> > #include<stdio.h> > > I link the object files using the options: > -static -static-libgcc -lws2 > > My application uses sendto() and recvfrom() to communicate with > multiple UDP > servers over WiFi. And I can see some UDP packets showing up at the > server > side using wireshark. However, I have noticed that many packets are not > actually sent even though sendto() returns a nonzero value. Similar > thing > happens to recvfrom(): most of the time I receive only one or two > incoming UDP > packets. > > I wonder whether I made any newbie mistakes? Please advise, and thanks > in advance. > > Best Regards, > Cheng > >
That really doesn't have anything to do with cegcc itself, that code you are trying to port most likely needs some porting to make it work on windows (did you forget wsastartup?). In any case, for every socket call check for error returns (or wsagetlasterror) and in case of a error check corresponding error description: http://lmgtfy.com/?q=windows+error+codes or winapi description: http://lmgtfy.com/?q=sendto+wince+site%3Amicrosoft.com ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel