RabidRaccoon 01-27-2002, 02:14 PM i need to create a chat program. does any1 know where i can find a decent tutorial and an example file for a complete newbie? i mean, i know how to program a bit, but i am clueless when it comes to winsock
thx :D
rabid
ChiefRedBull 01-27-2002, 02:19 PM There used to be one that I'd written in the Code Library, but after the forum software changeover, it got demolished...
The text is still online - HERE (http://www.btinternet.com/~richard.milns/tutors/winsock/first.html)
RabidRaccoon 01-29-2002, 09:23 PM thanks - i already read this one, but i need the figure 0.1... i emailed u at britneydidme@hotmail.com, but u didnt reply. can u post the figure or send it to me at rab1dracc00n@hotmail.com ?
thx,
rabid
orufet 01-30-2002, 06:06 PM http://www.vbip.com is a great site for Internet Programming. Check it out. If you have any specific questions, ask away!
RabidRaccoon 01-30-2002, 09:28 PM i have 2 questions, (dont expect any of these to be the last hehe)
1. how do you find out the IP address of your friends computer whom u want to install the chat program on.
2. does this program require each of you to be connected to the internet?
u can download ChiefRedBull's .vbp file by going to
http://www.btinternet.com/~richard.milns/tutors/winsock/Code/First/First.vbp
and u can download the form that it needs by going to
http://www.btinternet.com/~richard.milns/tutors/winsock/Code/First/frmMain.frm
thanks for all your help guyz
rabid
ChiefRedBull 01-31-2002, 02:33 AM 1) You can't find out an IP address just using a winsock. The best way to do it is to either have your server send the clients an email containing the IP of itself, or have the server post its IP on a secure web server somewhere online. Then when your clients come online, they can check the same web server for your chat servers IP.
2)Yes - everything must be online.
And cheers for discovering that source code.... I forgot it was online. I'm not sure its the latest though...
I'll check and repost in the code library. :)
RabidRaccoon 01-31-2002, 10:52 AM Thanks, just one question - couldn't we just specify our IP addresses in the ISP properties box, and then just tell the program to connect to each other's IP addresses?
(Under the Dial-Up Networking folder get the properties of your ISP then click on the Server Types tab. Click on TCP/IP Settings>Specify IP Address)
If this confuses you, tell me - I'll try to simplify it down a little
so is it doable?
ThAnKs, y0u GuYs are dOinG a GreAt job on this ForUm. K33p iT uP!
ChiefRedBull 01-31-2002, 12:19 PM No you cant because your IP has to be unique, so is assigned to you by your ISP. If everyone was specifying their own, you'd get hundreds of thousands with the same one = mass confusion.
RabidRaccoon 01-31-2002, 01:07 PM 1) You can't find out an IP address just using a winsock. The best way to do it is to either have your server send the clients an email containing the IP of itself, or have the server post its IP on a secure web server somewhere online. Then when your clients come online, they can check the same web server for your chat servers IP.
OK. What I dont get here is how I find out what the server's IP address is in the first place. :confused:
thx
rabid
ChiefRedBull 01-31-2002, 03:47 PM Alright, imagine you've got the server running on your machine in front of you. Now your friend across the street wants to connect to your server, using his client. Unfortunately, he doesn't know your IP...
BUT
If you put your IP on a web server somewhere... perhaps Geocities.com, he can look that up, and then can connect to you.
Create a Geocities account, then using your VB program, access it, logging in via a username and password, FTP into your webspace containing your IP, and wait.
Your friend will tell his client to visit the URL you put your file, eg "www.geocities.com/rabid/myip.txt" and download it, extract the IP, and bingo.
The easier way would be to learn a little CGI and instead of using FTP and uploading a file to the server, just submit a URL containing all the data like this:
"www.geocities.com/ip.cgi?&ip=127.0.0.1" Your cgi script will hold the information until your friend requests it.
I can imagine you'll probly want more specific help with these.... if so, post again in the relavant forum. :)
RabidRaccoon 01-31-2002, 05:35 PM I know how to type it into a txt file and put it online, but I dont know how to FIND OUT what it is. Is there some properties box I can open on my computer to find out its ip or what? :confused: :confused: :confused: :confused:
if i dont get it this time, me thinks me'll have to have someone call me and walk me through or something :(
ChiefRedBull 02-01-2002, 02:19 AM oh right, I getcha sorry... you dont know how to find out what your own IP is?
OK - two ways.
First, click on Start-->Run... and type "winipcfg" (wihtout the quotes) and hit Return. Your IP will be displayed.
Second - place a winsock control on a form, and tell it to MsgBox its .LocalHost property. This is your IP.
RabidRaccoon 02-01-2002, 11:05 AM thx dude thats what i needed :D im gonna go work on it now and try to get it to work
thx :D
rabid
RabidRaccoon 02-01-2002, 11:21 AM When i type in my friend's IP address, type in what i want to say, and press enter, it gives me a run time error :(
http://www.rosemountata.com/images-movies/Error.bmp
the pic is kinda big pixel size and file size (sorry!) :)
ChiefRedBull 02-01-2002, 03:48 PM This means that a connection hasn't been established between your controls.
Are you attempting to connect to your friends server using the Winsock.Connect method?
Are you accepting the connection request in the servers _ConnectionRequest() event?
Oh, and dont bother posting pictures, just type what the box says.... :)
RabidRaccoon 02-03-2002, 09:09 PM Sorry for not replying in so long - I reloaded my computer, and backed up VB and its registry files, but I missed a few DLLs which I'm currently trying to obtain from my uncle.
If you could send me them, that'd be great too. I need DAO350.DLL so far. We'll see how many more I'm missing as I run it. :(
Thanks,
Rabid
Thinker 02-03-2002, 09:35 PM Why aren't you reinstalling VB from your CDs? :confused:
RabidRaccoon 02-04-2002, 07:37 AM My uncle is the one who installed it on my computer and he has the CD so I emailed him asking for the DLL files or to just mail me the CD so I could extract them myself. :)
Rabid
|