Ok this is client - server based using Winsock. Here is what I have.
This is the client sending the data to server:
VB Code:
Private Sub Command5_Click() Dim msgee As String msgee = "GI" Winsock2.SendData msgee Exit Sub End Sub
This is the Server Receiving the data:
VB Code:
Private Sub winsock1_DataArrival _ (ByVal bytesTotal As Long) Dim strData As String Winsock1.GetData strData If strData = "GI" Then Dim info As String info = "Test" Winsock1.SendData info Exit Sub End If End Sub
This is the client receiving the data from the server:
VB Code:
Private Sub winsock1_DataArrival _ (ByVal bytesTotal As Long) Dim strData As String Winsock1.GetData strData Text1.Text = strData End Sub
Well it looks good except it is not working. When I click the command button in the first code, it shoud send the data to the server. Then the server will recieve the data and check if it is "GI". If it is then, it will create a variable with the text "Test" in it, and send it back to the client. Then whatever the client recieves back from the server will be placed in text1.text. Except nothing appears. I have gone through about 3 times and can't figure out whats wrong. Probably something simple, but im not sure. Can anyone help?
