Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When client disconnect #20

Open
Thomas1995 opened this issue May 17, 2016 · 2 comments
Open

When client disconnect #20

Thomas1995 opened this issue May 17, 2016 · 2 comments

Comments

@Thomas1995
Copy link
Owner

@ericpts

Let's talk about this scenario: we open the server for 3 clients, then connect with a client, disconnect, connect with another one, disconnet, and connect with the last one. This will happen:

thomas ~/GitHub/Rentz/bin $ ./server 3
Server up and listening for connections
Received 1 events
Accepted connection from 127.0.0.1: 19112
Connection on sfd = 5 is named TH
Received 1 events
Accepted connection from 127.0.0.1: 19368
Connection on sfd = 6 is named BC
Received 1 events
Accepted connection from 127.0.0.1: 19624
Connection on sfd = 7 is named BC


A new game has started!

The client has closed the connection
thomas ~/GitHub/Rentz/bin $ 
thomas ~/GitHub/Rentz/bin $ ./client 
Connected to 127.0.0.1
^C
thomas ~/GitHub/Rentz/bin $ ./client 
Connected to 127.0.0.1
^C
thomas ~/GitHub/Rentz/bin $ ./client 
Connected to 127.0.0.1
The client has closed the connection
thomas ~/GitHub/Rentz/bin $ 
@Thomas1995
Copy link
Owner Author

Also, after the game is over, the server should stop or it should create another table.

After a finished game, it says "Game is over", but it still listens for connections, get clients connected to it, even if another game will not start.

@Thomas1995
Copy link
Owner Author

Second bug solved in 5954af5. The first still remains open.

@Thomas1995 Thomas1995 removed their assignment May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants