Page 1 of 1

Text receive?

Posted: Fri Jan 27, 2017 3:41 am
by Zehra
Hi all,

It seems the client does not disconnect from a server as observer if someone fails to close it.
It would be nice if that a system is built on the client to "confirm" if a message was sent.
If the client does not confirm, the client assumes the player to be disconnected and sends a message like "message not confirmed by client (assume player might be disconnected and unable to reply due to it)".
Thoughts?

-Zehra

Re: Text receive?

Posted: Fri Jan 27, 2017 11:16 am
by blast
I don't understand what you mean. Why should a client disconnect if it's still running?

Re: Text receive?

Posted: Sat Jan 28, 2017 1:37 am
by Bullet Catcher
The protocol for this situation is to send "are you there?" to the player. If they respond, it is confirmed. If they don't respond, it is not confirmed. No changes to the game are required.

Also, server owners have the option to use -maxidle to automatically kick players who do nothing for too long.

Re: Text receive?

Posted: Sat Jan 28, 2017 2:13 am
by alfa1
I think he means he, as observer, might get 'not responding'. Then, as 'nr' doesn't appear in observer mode, and the other players can think he is there still and can be trying to chat to him, he might worry about not being able to respond them. He commented it to us recently in-game.

Re: Text receive?

Posted: Sat Jan 28, 2017 3:59 pm
by Zehra
I'm basically referring to an observer becoming not responding and players wondering why all of a sudden they might have stopped chatting.
And like alpha1 mentioned, nr does not display as observer. (A client can stay for hours while not being online or connected and "nr" wouldn't display.)
So I'm thinking it might help if the client would confirm if a message is received so it's possible to know if a player went not responding or is away from keyboard.
(If they're away from keyboard a message confirms they received it and if they're not responding a message appears saying it hasn't been confirmed by the client.)
(It would only appear if the client didn't confirm if the message hasn't been received and wouldn't show otherwise.)
It's probably is easier to implement as a plug-in or player protocol, but would be nicer to have as an in game feature.

-Zehra

Re: Text receive?

Posted: Sat Jan 28, 2017 11:38 pm
by blast
The NR status only applies to clients that send player updates. Observers do not send player updates since they do not have a tank (or if they do, they are not relayed to other clients). The "not responding" status is calculated by the client based on the last player update that they saw for non-observer clients.

Re: Text receive?

Posted: Sun Jan 29, 2017 3:08 am
by macsforme
For similar reasons, you cannot tell whether a player is NR if they're dead.

Re: Text receive?

Posted: Sun Jan 29, 2017 4:58 pm
by Bullet Catcher
If the network connection and client program are running normally, receipt of the TCP packet(s) containing a chat message is acknowledged automatically at the TCP layer, and the client's continued connection to the server is the confirmation you seek.

BZFlag client programs that are not responding at the network level will be disconnected from the server when their TCP connections time out, typically within a couple of minutes.

For determining whether some other player is at the keyboard and paying attention to you, anything beyond the "are you there" protocol I mentioned above would intrude on that player's privacy and we aren't going to implement it.

Re: Text receive?

Posted: Sun Jan 29, 2017 5:32 pm
by JeffM
There is the bzdbVariable sendObserverHeartbeat, it's intended to keep connections open, but it does not provide any visual feedback for the status of an observer.

Bzflag is not a chat program, use skype.

Re: Text receive?

Posted: Sun Jan 29, 2017 6:38 pm
by Bullet Catcher
The visual feedback for the status of an observer is that if they are connected then they are responding (the opposite of NR). There is no grace period for NR observers; they are immediately kicked when their NR state has been detected by the game server.