Hi.
I have Client-Server app.
Server app has DatagramSocket on port 6646, and it reads incoming data:
socket -> read(headerBuffer, maxBytes, false, sender, port);
it gets port
and sender
, and tries to send data to sender (client) socket back:
socket -> write(sender, port, array, sizeof(DataHeader));
Client app has DatagramSocket, and it is not bound to any port because it is client and gets data only in return from server. And the problem is it sends data, bet never receives:
int amount = socket -> read(headerBuffer, sizeof(DataHeader), false);
// amount is always -1
What am I missing? Please help!