Advertisement

getting UDP to work

Started by February 21, 2004 12:43 PM
5 comments, last by Raloth 20 years, 11 months ago
TCP is too slow for me, but I can''t find any good examples for sending and receiving a message with UDP. I have looked at Beej''s thing and it was completely useless for me. Can anyone post a quick code sample showing how to receive the packet that I send with sendto using recvfrom and WSAAsyncSelect?
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
Have you searched google?

-=[ Megahertz ]=-
-=[Megahertz]=-
Advertisement
For over an hour.

[edit] Stupid C++ didn't trigger a syntax error when I forgot the parenthesis after a function call (must have interpreted it as something else). All fixed now .

[edited by - Raloth on February 21, 2004 9:41:00 PM]
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
stupid C++... they should just get rid of it altogether!
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Not using the parentheses means the value of the symbol (i e, address of the function).

Most C++ compilers allow you to turn on warnings that will tell you when you do this.

Most good C++ compilers allow you to treat warnings as errors, so you have no choice but to fix the warnings (all of them!).

I suggest you figure out how to do this, as it probably would have told you about this case (i e, either "value not used" or "cast from pointer to int").
enum Bool { True, False, FileNotFound };
Well im glad you got your problem fixed.

I searched google and no theres not a whole lot out there in one spot on this specific topic, but theres enough spread around that you could cobble something together.

As far as warnings/errors go, even if I compile and get only warnings I usually fix those as I tend to treat them as errors out of habit. I usually let ones like int to float conversion warnings slide for a bit but eventually I go back and tidy them up and make em go away.

-=[ Megahertz ]=-
-=[Megahertz]=-
Advertisement
http://cs.baylor.edu/~donahoo/PocketSocket/winsock.html

This topic is closed to new replies.

Advertisement