|
-
Feb 23rd, 2005, 09:24 PM
#1
Thread Starter
New Member
Winsock Trouble
Hello, im new to these forums, but, im not new to VB. I used to use planetsourcecode as a forum site for VB, but, for some reason their link to get on the forums isnt working, so, I found some place which seems better.
Neways, I used Winsock a few times to create simple chat programs. My problem is, thats all I can do is send simple text to add the the textbox. I dont know how to send information so that I could, perhaps, add their username to a listbox, or, send coordinates so that the other person's client could move an image across the form. If anyone could explain the fundamentals of how this works, and give me an example, that would be great. Thank you
Shaun
-
Feb 26th, 2005, 01:34 PM
#2
Re: Winsock Trouble
 Originally Posted by Hate_Theory
Hello, im new to these forums, but, im not new to VB. I used to use planetsourcecode as a forum site for VB, but, for some reason their link to get on the forums isnt working, so, I found some place which seems better.
Neways, I used Winsock a few times to create simple chat programs. My problem is, thats all I can do is send simple text to add the the textbox. I dont know how to send information so that I could, perhaps, add their username to a listbox, or, send coordinates so that the other person's client could move an image across the form. If anyone could explain the fundamentals of how this works, and give me an example, that would be great. Thank you
Shaun
Hey welcome to the forums,
The reason i think you have had a delay ina reply is this is the wrong forum for future winsock and n-tier questions
http://www.vbforums.com/forumdisplay.php?f=64
Anyways to your problem, once you can send simple text you can do anything. Its all about how the server interprets the 'dimple' text that matters.
Lets say we are sending a username and password to the server for validation heres what would happen.
Assume we are connected 
> Client sends - "*,Pino,Password" - Notice the asterix, (you can use any character) this will let the server know what we will be doing (in our case sending a username and password)
> Server scans all incomming data for the first character using the left() function (http://www.vbforums.com/showpost.php...28&postcount=3) we can then use somthing like this
VB Code:
Select case myData
Case "*"
'validate password
case "¬"
'user has left
Case "~"
' user had died
end select
etc etc
So you see its not How you send the data that matters its how you inrepret it at the other end.
This may help explain it as well
http://winsockvb.com/article.php?article_id=25&page=1
I hope that answers your question,
if you are struggling in any way please post back 
Pino
-
Feb 27th, 2005, 08:07 PM
#3
Thread Starter
New Member
Re: Winsock Trouble
Pino, thanx for the help man, that was a great deminstration. I figured thats how it would work, but, I wasnt too sure so I thought I would double up and ask. Thanx again for all your help
Shaun
-
Feb 28th, 2005, 02:37 AM
#4
Re: Winsock Trouble
 Originally Posted by Hate_Theory
Pino, thanx for the help man, that was a great deminstration. I figured thats how it would work, but, I wasnt too sure so I thought I would double up and ask. Thanx again for all your help
Shaun
Hey,
No probs, if you could edit the first post and add [resolved] to the title that would be great 
And welcome to the forums
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
|