Re: Log Out Issues
From: Callum Winter (callum_at_REMOVE_THISwinter9999.fsnet.co.uk)
Date: 09/03/04
- Next message: Serge Wenger: "MS loopback adapter and ping local machine"
- Previous message: Eugene Gershnik: "Re: Winsock and IOStreams"
- In reply to: Alexander Nickolov: "Re: Log Out Issues"
- Next in thread: Alun Jones [MSFT]: "Re: Log Out Issues"
- Reply: Alun Jones [MSFT]: "Re: Log Out Issues"
- Reply: Alexander Nickolov: "Re: Log Out Issues"
- Reply: Callum Winter: "Re: Log Out Issues"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Sep 2004 11:40:49 +0100
Hi Alex,
I would be quite happy to use TCP to save headaches, but from every source
ive read during my learning, UDP is the way to go for internet games.
Apparently the extra overhead in TCP can cause a lot more lag in your game,
especially in the MMORPG variety where a mass of data passing is required to
keep everything running.
If you can confirm that these comments are out of date then ill move over to
TCP, but I ask why do most top online games use UDP for their protocol if
TCP were better.
I already have reliable/ordered/multithreaded communication, I just need
help with this one logging out/message passing problem. I must at least try
the fastest method before I give in and move to the simpler but slower
method of communication, as speed will effect the total number of players I
can have per hosting server.
Do you know of any good resources that at least give some varied solutions
to this problem.
Your comments are appreciated.
Callum.
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:uCCMa9TkEHA.2664@TK2MSFTNGP11.phx.gbl...
> Any reason you are not using TCP instead of UDP? TCP handles
> all these details already. If you want, you can implement TCP's
> algorithms yourself of course, but what would be your gain from
> that? TCP is implemented in the kernel thus it will be much more
> efficient...
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@mvps.org
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Callum Winter" <callum@REMOVE_THISwinter9999.fsnet.co.uk> wrote in
message
> news:%23PJ7Y4SkEHA.2340@TK2MSFTNGP11.phx.gbl...
> > Hi all, hope someone can help.
> >
> > I just started to learn winsock 2 a few weeks back, and ive already
wrote
> > code to send and receive user datagrams.
> > The code also performs ordering of incoming packets and sends ACKs for
> > reliable messages.
> > so that messages are resent until ACKS are received in reliable cases.
> >
> > Now all this works great but Ive come to a chicken and the egg problem
> > with
> > logging out.
> >
> > Lets say the client sends a log out request to the server reliably. The
> > server then gets this and sends a log out confirm message to the client
> > and
> > delete that host from its local list.
> >
> > If the client receives the message all is well and the client cleans up
> >
> > If the log out confirm gets lost, the client will hang forever waiting
for
> > the server to send another, which will never happen cos the server
deleted
> > that host.
> >
> > Now i could make the server wait until it gets another reply back from
the
> > client saying it got the logout confirm before it deletes, but then how
> > does
> > the client know when to stop sending this info unless the server
responds
> > back which it wont do once it deletes that host, it will only send an
ACK
> > once. If that ACK doesnt get to the client, the client will send
forever.
> >
> > This silly loop goes on and on and on.
> >
> > The only solution i can think of is to have the client time out after n
> > seconds if it doesnt receive a log out confirm. Problem here is that the
> > reason it may not of received a log out confirm isa beacuse the server
> > never
> > got the log out request in the first place.
> > So if the server never gets it and the client times out the server will
> > still think they are logged in and never free up that slot in its list.
So
> > then you have to have a timer on the server etc etc.
> >
> > This is all very messy. Does anyone have any comments on the best method
> > for
> > a player wanting to log out and how far to take the message back and
> > forthing. In fact how has everyone else combatted this problem.
> >
> > Any ideas would be greatly appreciated.
> > Thanks in advance.
> > Callum.
> >
> >
>
>
- Next message: Serge Wenger: "MS loopback adapter and ping local machine"
- Previous message: Eugene Gershnik: "Re: Winsock and IOStreams"
- In reply to: Alexander Nickolov: "Re: Log Out Issues"
- Next in thread: Alun Jones [MSFT]: "Re: Log Out Issues"
- Reply: Alun Jones [MSFT]: "Re: Log Out Issues"
- Reply: Alexander Nickolov: "Re: Log Out Issues"
- Reply: Callum Winter: "Re: Log Out Issues"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|