I am using winsock over tcp/ip based connection and I have successfully implemented a simple tcp-based client/server interaction. However, I would like to twist the implementation a little bit to for the server to send an echo of string from the client when one at the client end clicks cmdEcho or the server to send a reverse of the string when one at the client end clicks cmdReverse...Here is a bit of the code, if it can be of clarification:
Code:Private Sub myTCPServer_DataArrival(ByVal bytesTotal As Long) 'Read incoming data into the str variable 'then send it back to client as an echo and a reversed string Dim message As String myTCPServer.GetData message lblDisplayClientText.Caption = message myTCPServer.SendData message End Sub




Reply With Quote