I am trying to connect to my RFID printronix printer using sockets with this code :
if (ep == null)
{
ep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9001);
}
socket = new Socket(ep.AddressFamily,
SocketType.Stream,
ProtocolType.Tcp);
socket.Connect(ep);
I am using port 9001 because this is usually standard port for printers, however, when i look at printer properties I see it is using USB001, which is the virtual usb port.
I receive this error I'm assuming because of the port number.
No connection could be made because the target machine actively refused it 127.0.0.1:9001
How do I retrieve port number for this printer. If that is not the error, please help. Thanks.