|
-
Oct 29th, 2007, 02:57 PM
#1
Thread Starter
New Member
Winsock echo and reverse
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
-
Oct 29th, 2007, 05:24 PM
#2
Re: Winsock echo and reverse
What do you need, how to reverse a string? How to tell the server which to do? How to have the server send text to the client?
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Oct 30th, 2007, 02:37 AM
#3
Thread Starter
New Member
Re: Winsock echo and reverse
If one clicks cmdEcho on the clientside, then the server should send back the same string for client to display on txtEcho
and if one clicks cmdReverse, the server should reverse the string it received from the client, reverse it then send to client for display on txtReversed
appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|