Can anyone help me on this one.
Basic4PPC
Sub button2_Click
Client.Connect (textbox1.Text,50000)
binary1.New1(client.GetStream,False)
binary1.WriteString ("Server Connected")
End Sub
Sub tmrWaitForData_Tick 'Checks the DataAvailable property
If client.DataAvailable = True Then
tmrWaitForData.Enabled = False
listbox1.Add(binary1.ReadString)
tmrWaitForData.Enabled = True
End If
End Sub
VB6
tcpserver(Index).GetData strData
tcpserver(Index).SendData txtoutput.Text
tcpserver is a winsock control
From client to server communication is fine. From server to client, one of the 3 things will happen when I click on the button to send text string to the client:
1. Nothing happens
2. All the strings appears from my previous button click will appear on the client.
3. Error : "Unable to read beyond the end of the stream" from the client
Please help. Thanks.