I am trying to connect the medical equipment with LAN cable. and i am using C# based windows application to receive the data which machine is sending when any blood sample runs in machine
As per my requirement i need to use TCP listner to recevie the data which machine is sending.. but when i connected medical equipment(ip address - 126.96.36.199) with my laptop(ip address- 188.8.131.52) throw lan then i am getting error message like "The requested address is invalid in this context".
(I already checked both sender ip is able to ping from laptop as well).
Then i read may articale and find that need to use IPADDRESS.ANY. But this will not help me.
Means sender machine says ///when cursor comes to start the listener then it is throwing the error msg. please check network connection...
pasting my code here.. please check and help me with this
//Posting my complete code
string response = String.Empty;
IPAddress ipAddress = IPAddress.Parse("184.108.40.206");
TcpListener listener = new TcpListener(ipAddress,5100);
client = listener.AcceptSocket();
var childSocketThread = new Thread(() =>
data = new byte;
int size = client.Receive(data);
ASCIIEncoding encoder = new ASCIIEncoding();
string returndata = Encoding.UTF8.GetString(data);
// Get response
string responce = responcemsg();
//Custom save funtion