Author | Message | Time |
---|---|---|
Imperceptus | I am making a game client for Ragnarok Online. The Server is actually made up of 3 Programs each running on a different Port. I am Currently Using 3 different sockets to handle the 3 different servers, but Im pretty sure that It could be done with 1 socket. What would you do? | May 13, 2005, 3:20 PM |
R.a.B.B.i.T | I would use an array of sockets. | May 13, 2005, 5:01 PM |
Imperceptus | I thought of that solution myself as well, A good Idea, but I hate passing around the stupid index of the socket. | May 13, 2005, 5:20 PM |
Yegg | I agree with rabbit, arrays are the best way to go when you want to work with multiple sockets (or other classes) and have easy access to them. | May 13, 2005, 7:09 PM |
Quarantine | afaik just create a new instance of the object by refrencing it | May 13, 2005, 8:07 PM |
UserLoser. | If it uses UDP you could possibly use one socket | May 14, 2005, 12:54 AM |
R.a.B.B.i.T | That's true, but from the way he described it it sounded like TCP, so that's what I went with. | May 14, 2005, 1:02 AM |
Imperceptus | Heres how things work I connect to server 1, talk to it a bit, get a message that i then use to connect to server 2, talk with server 2 then get a message that i use to connect with server 3 from which I sustain my connection with., I dont need to be connected to all the servers at the same time at all. | May 15, 2005, 2:59 AM |
LivedKrad | Looks to me like you only need to maintain one connection at any given time. | May 15, 2005, 6:56 AM |
R.a.B.B.i.T | In which case you could simply use 1 socket and not have to deal with multiple controls or the passing of an index variable. | May 15, 2005, 3:31 PM |