Heres the data arrival sub on server:
VB Code:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim strData As String Winsock1(Index).GetData strData 'get the data If Left(strData, 4) = "MSG " Then 'if the first part of the data says MSG MsgBox Split(strData, ":")(0) & ": " & Split(strData, ":")(1), vbInformation, "Message From Master" 'Show msgbox for example Chris: HEY End If End Sub
And in the client...
VB Code:
Private Sub cmdSend_Click() Dim Data as String Data = "MSG " & txtNick.Text & ": " & txtMessage.Text Winsock.SendData Data End Sub




Reply With Quote