Re: How to format/send/receive UDP packet in C?
> I'd like to ask about how to format/send/receive UDP datagram packet
> in C language. The server that I'd like to send the packet to is
> listening on port 1500. When I succesfully connect to that port, it's
> gonna create and send a packet back to the client. The only code I
> need to write is the client-side code. The problem is, I don't have
> any idea how to:
> 1. Send data packet to server (I'm going to send the data in Hex
> 2. Receive data back from that server
> I also don't have any idea how to format the packet. Please give me a
> simple explanation. Thank you so much.
> PS. I searched for example code, but I got only the one that show me
> how to send packet to server. No code show me how to also receive the
This is wildly off topic for clc but what the heck.
UDP is connectionless. You send packets but you don't actively make a
stateful connection with the destination [e.g. no way to know if it gets
To receive UDP packets you have to be listening [e.g. bind to a UDP port].
|All times are GMT. The time now is 01:38 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.