How to send and receive, using UDP, in C++ in Linux? I use g++
Ok it's preety simple. I was workig in CentOS 5.5 which is linux and i make a server-client programme based on udp in c.It runs well.
The procedure is simple. It follows as ..
**SERVER**
0.Variable initialization
1.sock()
2.bind()
3.recvfrom()
4.sendto()
**CLIENT**
0.gethostbyname()
1.sock()
2.bzero()
4.sendto()
5.recvfrom()
You will understand the code if you see the documentation.
If its not work that way then go to >> matrixsust.blogspot.com for source.
Using boost::asio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With