+ 2
Does a socket always echo's the message it has send
I have this client-server application. Where I send a message throug a socket (system.net.sockets.socket) int bytesSend = senderSock.Send(msg); ReceiveDataFromServer(); And start a method to receive the data from the server int bytesRec = senderSock.Receive(bytes); The application is waiting, till I stop the program. My question : Should I expect a to receive a answer via senderSock (or at least a echo) or should the server actively create a answer ? The application is a copy of the article in the link below. https://www.codeproject.com/Articles/463947/Working-with-Sockets-in-Csharp
2 Réponses
+ 3
Until I can look properly (tomorrow)...
Modems often echo, as might some telnet apps, but remotes can be silent (dataless) if the protocol handles statuses.
Thoughts...
Firewalls could be in play, or you may be failing to actually finish your packet, i.e. not enough bytes or improper end sequence.
Wireshark/tcpdump can help troubleshoot (as can testing on localhost, e.g. 127.0.0.1) to confirm functionality.
0
Thank you. I would appreciate. I agree with you it will be a blocked or in use port, of a annoying firewall. I have not figured it out het. The port is 4510. The devices are software sockets (system.net.socket) not a modem.