Courtney
Jun 1st, 2000, 01:22 AM
I started writing a client/server app at my house (on a Windows 98
Machine)...all works fine. When I brought the VB project to work and tried
to continue programming on a Windows NT machine, the client Winsock control
failed to connect to the server app.
Both machine's VB was installed from the same Visual Studio 6.0 CD and both
VBs have service pack 3 installed.
Here are the lines of code I use for the two Winsock controls:
Server App----------
tcpServer.Protocol = sckTCPProtocol
tcpServer.LocalPort = 1175
tcpServer.Listen
This works fine and the Winsock control state, tcpServer.state, equals
sckListening.
Client App-----------
tcpClient.Protocol = sckTCPProtocol
tcpClient.RemotePort = 1175
tcpClient.RemoteHost = "20"
tcpClient.Connect
I get no error when I run this code, but when I try to send data
(tcpClient.SendData Text1.Text), I get the Run-Time Error 4006. It talks
about the Winsock control being in the wrong connection state to process the
requested transaction.
After recieving this error, I checked the state (tcpClient.State) of the
Winsock control every few seconds after trying to connect. For the first
minute after trying to connect, the state of the tcpClient was 6,
sckConnecting. Then, it'd change to 9, sckError.
So for some reason the Winsock control is never connecting to the other one.
I also know that the server app Winsock control NEVER recieves the
connection request.
I go to my network settings and I have a TCP/IP Protocol installed. Do you
think that settings on my NT are causing this problem or ... I'm clueless.
Like I said before, the same program works fine on my Win98 machine.
Thanks,
Courtney
Machine)...all works fine. When I brought the VB project to work and tried
to continue programming on a Windows NT machine, the client Winsock control
failed to connect to the server app.
Both machine's VB was installed from the same Visual Studio 6.0 CD and both
VBs have service pack 3 installed.
Here are the lines of code I use for the two Winsock controls:
Server App----------
tcpServer.Protocol = sckTCPProtocol
tcpServer.LocalPort = 1175
tcpServer.Listen
This works fine and the Winsock control state, tcpServer.state, equals
sckListening.
Client App-----------
tcpClient.Protocol = sckTCPProtocol
tcpClient.RemotePort = 1175
tcpClient.RemoteHost = "20"
tcpClient.Connect
I get no error when I run this code, but when I try to send data
(tcpClient.SendData Text1.Text), I get the Run-Time Error 4006. It talks
about the Winsock control being in the wrong connection state to process the
requested transaction.
After recieving this error, I checked the state (tcpClient.State) of the
Winsock control every few seconds after trying to connect. For the first
minute after trying to connect, the state of the tcpClient was 6,
sckConnecting. Then, it'd change to 9, sckError.
So for some reason the Winsock control is never connecting to the other one.
I also know that the server app Winsock control NEVER recieves the
connection request.
I go to my network settings and I have a TCP/IP Protocol installed. Do you
think that settings on my NT are causing this problem or ... I'm clueless.
Like I said before, the same program works fine on my Win98 machine.
Thanks,
Courtney