-
Re: [VB6] - Multi-User Chat Example (Winsock)
You're probably behind a router, making it unable for outsiders to access your chat-server.
Try redirecting port 1234 to your local IP if that's the case.
You should then also make sure you have the public IP address and not the local one.
Reserved (Default) Local IP's:
Code:
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
You can get your public IP by going to whatismyip.com.
And as I mentioned before in this thread, a guide to port forwarding.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
You are right, I have a router, what is the local and public IP address and how can I find them out?
EDIT: Ok I got my public IP its different than my local one though.
And when I find them, when people want to connect to my chat server what would they type in on the client end?
EDIT2: When I try to connect using my public IP and port 1234 I get the error connectionj forcefully rejected.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Look at the port forwarding I mentioned.
NOTE: you should be running the server application.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Ok I picked my router on the site, but it asks to select the program you are forwarding ports for from the list below
What would I pick?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
The last line says:
If you do not see the program you are forwarding ports for, be sure to visit our Default Guide for this router.
Click that Default Guide.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Ok it asks me if I want to forward a single port, is this what I want? And if yes, I want to forward port 1234?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Ok, I did it, but when I try to connect I get a time out error on my client end?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Justin M
Ok, I did it, but when I try to connect I get a time out error on my client end?
As was said before, the port needs to be opened (1234 unless you change it). You shouldn't be getting any error which is why I think either the port was not opened correctly, or there is a firewall blocking access.
Here are some steps you (or anyone else experiencing this problem) should follow:
1. Disable the Windows XP Firewall (or other firewall if you have one) or allow BOTH the server and client to access the internet through your firewall.
2. Go to Start -> Run -> and type "cmd" and press enter. (You may need to enter "command" for other versions of Windows). This will open a command prompt.
3. Type "ipconfig" and press enter. It should show your LOCAL IP address if you are behind a router (ie: 192.168.1.101). This is the IP address you will use to setup your router.
4. Now, you need to get into your router settings. You can usually do this by opening a web browser (Internet Explorer/FireFox, etc) and typing in your router's IP address. This is usually 192.168.1.1 or something like that.
5. It will prompt you for a username and password. The defaults are usually something like "admin/admin", "admin/administrator", etc.
6. Once you are in your router settings, you need to find "Port Forwarding". There are several fields. For the application name, enter anything, like "VBChat" or whatever. Then enter the starting port, and ending port. For this program, by default, the port is 1234. So enter 1234 in both boxes.
7. Then there is a "Protocol" dropdown box. This program uses TCP, but to be on the safe side, just select the "Both" option.
8. Enter the last 3 digits of your LOCAL IP, that was found in step #3.
9. Then save the settings. Close all instances of VBChat that you might have open, and restart it. It should work.
The quickest way, is to find the "DMZ" option in your router settings and enable it for your IP address. However, I don't recommend doing this as it opens ALL ports on your router and leaves your computer wide open.
-
Updating
I downloaded the source code and am currently adding in some more features (multiple rooms, private messages, maybe emoticons, webcams, file transfers, whiteboard, and probably a few other things so stay tuned :p).
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Thanks for the help, but in step 8:Enter the last 3 digits of your LOCAL IP, that was found in step #3 , where do I enter that?
-
1 Attachment(s)
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Justin M
Thanks for the help, but in step 8:Enter the last 3 digits of your LOCAL IP, that was found in step #3 , where do I enter that?
It should be in the port forwarding settings. Here is a screenshot.
-
1 Attachment(s)
Re: [VB6] - Multi-User Chat Example (Winsock)
Ok So I attached an image of my router settings, I am wondering if I did it right.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
That looks right if you entered the correct IP address. Now you should run the server and have people connect to you.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Ok Could you do me a favor and see if you can connect to IP 192.168.2.12 with port 1234?
No one is in my chat room :(
-
Re: [VB6] - Multi-User Chat Example (Winsock)
192.168.2.12 is your lan ip
www.whatismyip.com to get your external ip. If u have a dynamic ip it will change every 24 hours or so
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Its my computer IP, so my external IP would be my router which is 142.167.89.15
What would I have to change?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Justin M
Its my computer IP, so my external IP would be my router which is 142.167.89.15
What would I have to change?
Your router settings look right. You use your local IP (192.x.x.x) for that, like you did.
Your external IP (142.167.89.15) is what you give to someone who wants to connect to your server.
Edit: I am connected to your server so it works. :)
-
Re: [VB6] - Multi-User Chat Example (Winsock)
OMG thank you so much, sorry if I don't reply to you in the chat room I have to go to school but thanks a million!!!!!
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Justin M
OMG thank you so much, sorry if I don't reply to you in the chat room I have to go to school but thanks a million!!!!!
You're welcome.
Next (big) version will be out in the next day or two, features I am including are:
File transfers
Webcams
Custom rooms
Password-protected rooms
Whiteboard
Private messages
Kick/ban
Those are what I have planned for now, I might think of some other ones in the process.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Kick and ban would be good.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Wait a sec, if people who join my server can see my router IP and my comp IP would that mean they can hack me???
-
Re: [VB6] - Multi-User Chat Example (Winsock)
If you use internet explorer or the windows firewall, there's a big chance people can :D
Just kidding.
But I personally have more faith in a non-M$ firewall.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Justin M
Wait a sec, if people who join my server can see my router IP and my comp IP would that mean they can hack me???
If you're so worried about getting hacked from someone knowing your IP, then may want to unplug your modem and not use the internet. ;)
-
Re: [VB6] - Multi-User Chat Example (Winsock)
lol Thanks but I would like to have a sound play when someone sends a message, where would I put the play sound code?
And when some enters the chat?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Justin M
lol Thanks but I would like to have a sound play when someone sends a message, where would I put the play sound code?
And when some enters the chat?
Look in the DataArrival() event to find the name of the sub that is responsible for handling when a message is received and when someone enters/leaves.
Then go to the code for that sub and put your "play sound" code there.
Sorry it's taking so long for the update. I've been real busy doing jobs on www.rentacoder.com and haven't had any free time.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
lol thanks, its ok. Out of curosity, is there alot of money to be made on rentacoder?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Only if you're an advanced coder and are experienced in customer programming.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
There are a lot of smaller projects < $200. There are also those that are $500-$2,000+. There's a wide variety of different types...for every possible programming language you can imagine. Not that many for VB6. Lots for PHP/MySQL, HTML, CSS, etc.
I've been doing a lot of the smaller ones, myself. Hopefully I can land a big one soon. :D
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Umm this is usually to ask, but could anyone download the free antivirus prog I made and see if they can log on.
welll maybe the code here can log on my chat server, cause alot of peeps say they can't
the IP of the server is 142.167.72.254
-
Re: [VB6] - Multi-User Chat Example (Winsock)
I was wondering, is there a way to change the color of the text you type with and when you send a message the text will look the same in the conversation box?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
I don't know how this app is built, but if there is a regular textbox, you need to replace it with a RichTextBox control.
With that, sending the .rtfText property (instead of the .Text), you might be able to send multiple colors, but I'm not sure though.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
TheBigB is correct. If I remember my own project correctly, I used a standard TextBox to keep things as simple as possible.
My original plan was to make this and hope that people were able to learn from it and add in their own features as a learning experience, that's why I kept it so basic.
But I've gotten a lot of requests to modify it and so that is what I am almost done doing now (except I started a new one from scratch)...
Server setup wizard
Custom room creator with passworded rooms
User-created rooms
Rich text (using the RichTextBox control)
File transfers/folder sharing
Admin features for server (kick, ban, warn, global message)
Webcameras
Whiteboard
Finally done with all of my RentACoder projects so I have time to work on it now...stay tuned. :p
-
Re: [VB6] - Multi-User Chat Example (Winsock)
i am ready to see the updated version of this.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Yea lets get the super version going!!
lol
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Id like to see how you do the webcams. Thats one thing I havn't been able to figure out ;]
-
Re: [VB6] - Multi-User Chat Example (Winsock)
i'm having trouble getting bold italics and underline to show in the chat window. also my users are wanting to have special colors for their names, any help.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Every time I get back to work on this, something else keeps coming up. Just want to let you know that I have been working on it and there really isn't much left to do and I am finishing it up.
Edit: minidesigner, choosing colors for names is a good idea actually, never thought of that. I will put that in there also.
-
Re: [VB6] - Multi-User Chat Example (Winsock)
I would just like to thank DigiRev... I downloaded your source and have started fine tuning it for what I am looking for personally. I just want to thank you for being willing to do so much work for no monetary reward. A lot of people wouldn't be willing to do such work. I like the classic version and will continue coding ontop of it.
Question though (for anyone) is it going to be OK to continue programming in Visual Basic 6.0 or is Visual Basic 2008 Express the way to go for free lance programming for personal use?
-
Re: [VB6] - Multi-User Chat Example (Winsock)
Quote:
Originally Posted by Genovah
I would just like to thank DigiRev... I downloaded your source and have started fine tuning it for what I am looking for personally. I just want to thank you for being willing to do so much work for no monetary reward. A lot of people wouldn't be willing to do such work. I like the classic version and will continue coding ontop of it.
Question though (for anyone) is it going to be OK to continue programming in Visual Basic 6.0 or is Visual Basic 2008 Express the way to go for free lance programming for personal use?
http://www.vbforums.com/attachment.p...id=47243&stc=1
We like to have people create their own threads for questions like this but in any case, while VB6 will be around for several years at least, (sadly) you should probably switch over to 2008.