|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using Winsock / TCP ClientI am using a winsock device to stream printer code to a printer. It works well enough except one problem you may be able to help with. When I establish a connection and stream code to the printer, it works immediately, and the printer prints immediately. I can stream code to the printer multiple times with no delays. However, once I close the tcpClient, and re-open it, the printer does not print until I shut down the VB.Net application. I have tried multiple different places to close and reopen the tcpClient, but so far, unless I keep it open for the duration of the application, I lose the immediate printing until I shut down the application. I guess it is sitting in a buffer somewhere, but I cannot find it. Any suggestions? Thanks in advance for your time. Mark Breen Ireland Mark,
You might be needing to dispose of the tcpClient fully prior opening a new connection. I ran into the same thing with a serial datastream. I had to completely build and release (mySerialConn = nothing) the connection between sessions. VB otherwise was trying to use objects that were in limbo. Everything would run fine the first time but fail the second. Just my $0.02 Tom Show quoteHide quote "Mark L. Breen" <mark.breen@nospam-gmail.com.off> wrote in message news:%230j1hKnJGHA.2628@TK2MSFTNGP15.phx.gbl... > Hello All, > > I am using a winsock device to stream printer code to a printer. It works > well enough except one problem you may be able to help with. > > When I establish a connection and stream code to the printer, it works > immediately, and the printer prints immediately. > > I can stream code to the printer multiple times with no delays. However, > once I close the tcpClient, and re-open it, the printer does not print > until I shut down the VB.Net application. > > I have tried multiple different places to close and reopen the tcpClient, > but so far, unless I keep it open for the duration of the application, I > lose the immediate printing until I shut down the application. I guess it > is sitting in a buffer somewhere, but I cannot find it. > > Any suggestions? > > Thanks in advance for your time. > > > Mark Breen > Ireland > > |
|||||||||||||||||||||||