I am completely new to socket programming and beginner-intermediate in c++.
I have written a code in c++ and also another application in java. The java program will get data from the c++ code which generates data in seconds. I am trying to use socket programming to transfer data between these two. I have found some code here: Socket programming tutorial. I am using the UDP java client from it. However, for the UDP server it only has the C code. I need to embed this code into my C++ app. therefore I need a c++ version of it. Can anyone help me with this? or give me a link that gives a tutorial on it. anyhow the C code is:udpserver.c
I am completely new to socket programming and beginner-intermediate in c++. I have written
Share
You must declare addr_len as socklen_t, not int.
That is, the first few lines in main should read something like:
… Leaving everything else as it were.