I'm using:
- Visual Studio 2012 Express, C#, .NET Framework 2.0
- POS printer : TYSSO PRP-300, IP:192.168.1.100
I connect successfully to the printer using:
C:\> telnet 192.168.1.100 9100
_
Also using:
C:\> portqry -n 192.168.1.100 -e 9100 -p TCP
TCP port 9100 (unknown service): LISTENING
But when using this code:
TcpClient c = new TcpClient("192.168.1.100", 9100);
I got this exception:
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Additional information: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond