Hi,
I have this part of code (server) for DataArrival:
Code:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim stringa, r, username, password, U, P As String
Dim AryData() As String

Winsock1.GetData stringa, vbString

AryData = Split(stringa, ",")
U = AryData(0)
P = AryData(1)

Open "C:\dati.dat" For Input As #1
txtUsername.Text = U
txtPassword.Text = P

Do While Not EOF(1)
    Input #1, username, password
    If username = U And password = P Then
        r = "OK"
    Else
        r = "ERROR"
    End If
Loop

Close #1

txtRisposta.Text = r
Winsock1.SendData r

End Sub
And this for client:
Code:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim stringa, r As String

Winsock1.GetData stringa, vbString

txtRecvData.Text = r

If r = "ERROR" Then
    MsgBox "Non sei registrato", vbOKOnly, "Errore"
End If
If r = "OK" Then
    MsgBox "Hai effettuato l'accesso", vbOKOnly, "OK"
End If

End Sub
I don't know, but the client don't receive the variable "r".

Why?

Sorry, but I'm new of Winsock

(If you need whole code, tell me)

Thanks, bye