I have a following little code for server side:
Dim listenSocket As New ChilkatSocket
Dim success As Long
success = listenSocket.BindAndListen(8051, 25)
Dim connectedSocket As ChilkatSocket
Set connectedSocket = listenSocket.AcceptNextConnection(0)
seg$ = connectedSocket.ReceiveUntilMatch("¤¤¤END¤¤¤")
success = connectedSocket.Close(50)
Set connectedSocket = Nothing
If Left(seg$, 4) = "STOP" Then Exit Do d = DoEvents
It works fine but i can stop the running of the code in VB6 design mode when i send the 'STOP' word from the client side. The Ctrl+Break key combination dont't work so i can't switch to debug mode. What should i change for a breakable code? Thanks for your answer.
I tried your code and it work if I typed:
Since you are waiting on "¤¤¤END¤¤¤", you have to make sure to send that string to return control to your code.