I have a telnet client that i use for remote access. i am using sockets.net. the sample below is what i use to connect...
Try
Me.state.CheckState = CheckState.Unchecked
ClientSocket = New Socket(AddressFamily.InterNetwork, _
SocketType.Stream, ProtocolType.Tcp)
ClientSocket.Connect(txtAddress.Text, txtPort.Text)
Connected(Nothing)
Me.btnConnect.Text = "Disconnect"
Catch ex As Exception
Exit Sub
End Try
I connect just fine and am able to run commands, receive data, etc... but there are certain commands that i run that return 2 responses... first i get "ORDERED" then anywhere from 5 to 30 seconds later I get an "EXECUTED" response. I am seeing "ORDERED" but i never get the "EXECUTED" response, though the command is executing just fine. It just doesn't seem that my application is waiting long enough to get the second response. I tried to implement a separate listener but couldn't get that to work because the socket was already in use. Does anyone have any ideas on how to make my app listen until either I get an "EXECUTED" response or until it times out after 60 seconds?
Try
Me.state.CheckState = CheckState.Unchecked
ClientSocket = New Socket(AddressFamily.InterNetwork, _
SocketType.Stream, ProtocolType.Tcp)
ClientSocket.Connect(txtAddress.Text, txtPort.Text)
Connected(Nothing)
Me.btnConnect.Text = "Disconnect"
Catch ex As Exception
Exit Sub
End Try
I connect just fine and am able to run commands, receive data, etc... but there are certain commands that i run that return 2 responses... first i get "ORDERED" then anywhere from 5 to 30 seconds later I get an "EXECUTED" response. I am seeing "ORDERED" but i never get the "EXECUTED" response, though the command is executing just fine. It just doesn't seem that my application is waiting long enough to get the second response. I tried to implement a separate listener but couldn't get that to work because the socket was already in use. Does anyone have any ideas on how to make my app listen until either I get an "EXECUTED" response or until it times out after 60 seconds?