Hi there.
I have an SPV C550. I am deving an app in C# using .NET framework 1.1 and VS.NET 2003
I now recieve a different error message than the part where it could not flush the data.
"System.IO.IOException:Unable to write data to the transport connection. ---> System.Net.Sockets.SocketException:An existing connection was forcibly closed by the remote host"
?
The connection on the remote host is open and listening to the TCP socket and port. The client based app has resolved the DNS host name and have given it the same port number as the port number the remote host is listening to.
any ideas?
Code:NetworkStream ns = this.client.GetStream(); if(ns.CanWrite) { string msg = "hey, its me buddy! the client"; byte[] byteMessage = System.Text.Encoding.ASCII.GetBytes(msg.ToCharArray()); ns.Write(byteMessage, 0, byteMessage.Length); ns.Flush(); }




Reply With Quote