• Welcome to Valhalla Legends Archive.
 

To use more then 1 socket?

Started by Imperceptus, May 13, 2005, 10:20 AM

Previous topic - Next topic

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?
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

R.a.B.B.i.T

I would use an array of sockets.

Imperceptus

I thought of that solution myself as well, A good Idea, but I hate passing around the stupid index of the socket.
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

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.

Warrior

afaik just create a new instance of the object by refrencing it
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

UserLoser.

If it uses UDP you could possibly use one socket

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.

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. 

Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

LivedKrad

Looks to me like you only need to maintain one connection at any given time.

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.