Hello,
I was just thinking of an idea in my head, of a chat program. Basically its like CounterStrike. Although, I don't know much about the layout of CounterStrike. But basically the plan is, there is one huge server that displays the current servers, and in each server there are clients chatting, talking, etc. So here is the layout:
HUGE SERVER > Multiple Servers(20+) > Multiple Clients(10+echs)
echs=each server
Its basically something like that. The reason I posted this, is because I want to know if that would work. I was thinking about how does a Server conenct to a Server...and basic stuff like that.
Any ideas are appreciated!
thanx
alacritous
Last edited by alacritous; Aug 25th, 2003 at 03:33 PM.
A Server is really nothing more than a program with multiple sockets open on the program. (Use an array of the winsock control). You'll want another array of sockets to hold the servers that are connected to your servers. All you have to do is develop a sort of protocol so the clients and servers can communicate with your main server.
There's not alot I can explain, I mean, the way data thats used to communicate is all up to you, so good luck.
Hello,
Thanks for your quite response, but I have a few questions/concerns. I didn't understand what you meant when you said:
You'll want another array of sockets to hold the servers that are connected to your servers. All you have to do is develop a sort of protocol so the clients and servers can communicate with your main server.
Can you please elaborate?
Basically I've already thought of how I'd like to send the data. Once a client connects, it looks at the 'MASSIVE SERVER' for server lists. This will be displayed in a list box. Then, if they click on an item in the listbox, it will connect to that server. In this server they may have a greeting bla bla and stuff and other people chatting. But basically you need to download different versions of 'NORMAL SERVERS' to start a server..some have greets and so forth...basically I'm going to start with a simple chat server then move on to more advanced things. The problem is, I need the 'MASSIVE SERVER' to run 24/7 or close...and I can't really do that...since of course on storms and stuff may get disconnected. But, its not like this is gonig to be the best chat in the world...unless anyone of you would like to help me create it. We can think of a name or anything...just mail me at [email protected] if your interested. Right now I'll start creating it alone.
The only problem I could think of, is if I can have unlimited 'NORMAL SERVERS' how would I find the ports for them like for instance, 'Winsock.LocalPort = 10101'.
Any other ideas or correction is appreciated!
thanx
alacritous
Last edited by alacritous; Aug 25th, 2003 at 05:47 PM.
Hello,
I was basically just experimenting with the 'NORMAL SERVER' and 'CONNECTED USER'...since I hadn't done winsock in a few weeks. I got it to work, but there is one problem, I can't get 2 clients/connect users to connect to the 'NORMAL SERVER'. I know you use multiple connections, but how? I've never really done that. Basically after I get that figured out I'll work that out, then I'll be able to create the 'MASTER SERVER', which will probably be the hardest.
- I'm listening to the connections port
- Woah! A connection request! Send a reply to tell to use port 5324
- The client is happily connected to me!
From the client's perspective:
- I gotta connect that darn server. Here I go...
- Yay! I got connected! He tells me to switch to port 5324... so here I go
- Connected! He really listens to me what I'm saying
You should take a look at IRC protocol. RFC 1459 and RFC 2810 - 2813.
Hello,
I got pretty much everything, except for one thing, I still can't get the multiple winsock connections, I know you use arrays, but I can't seem to get it to work. I guess I'll post my code...and you maybe edit it or just tell me what to do (btw its not a school assignment...so). Also, can you have unlimited sockets? If not, I'd like to have 5 to start out with..or 2 and I'll add them...