Commit Graph
83 Commits
Author SHA1 Message Date
lotodore 744e5c81d4 Small fixes. Removing some TODO comments which are no longer valid. 2009-06-13 10:52:12 +00:00
lotodore 3b25e18fde Rewriting boost asio timer stuff. (Did I mention I dislike the asio "cancel" semantics?!). TimerManager is no longer used. Should be stable now, but might leak some memory (needs further testing). 2009-06-12 15:48:34 +00:00
lotodore a33d9b7c3b Trying to fix strange timer crashes. 2009-06-09 23:04:04 +00:00
lotodore c8594e8e7b Canceling asio timers has bad semantics, and causes loads of trouble. Therefore, cancelled timers are simply marked as such, and the asio callback is silently ignored. This fixes several crashes, if players were removed from a game due to an error, because some timers were not cancelled. *sigh* This one took a lot of nerve. 2009-06-07 23:25:13 +00:00
lotodore 5f3369432a Rewriting sender yet again to fit the new asio design. Polling for new send data is no longer needed, this also reduces lag. 2009-06-07 08:51:43 +00:00
lotodore 47648392fb Use boost::asio timer callbacks instead of self-made ones. There are still some termination issues (terminating a network game will result in a crash). However, it should be quite effective now with a large number of users. 2009-06-01 19:49:16 +00:00
lotodore 24abedbbab Renaming class ServerGameThread to ServerGame. 2009-05-31 20:14:46 +00:00
lotodore f2bd0c6111 ServerGameThread is no longer a thread. 2009-05-31 19:45:20 +00:00
lotodore fab224c8ad Fixing some timer problems. Starting an internet game now works again. There are still some issues: Games are never terminated, and error handling is not implemented (errors will terminate the server). 2009-05-31 13:47:10 +00:00
lotodore 59358bff0e Fixed server crash when trying to start a game. Server is still broken, though... 2009-05-31 13:17:02 +00:00
lotodore 2952f0b85d Fixing some compiler warnings and single-threaded game issues. Note: The server currently crashes when trying to start a game. 2009-05-31 11:00:33 +00:00
lotodore 08ed5e0496 Almost complete rewrite of server game state due to porting the network engine to asio. Server is still broken in a lot of ways. A game is no longer run in a separate thread (but this change is still incomplete). 2009-05-30 22:20:40 +00:00
lotodore 8ab2fed1a2 More restructuring. Still broken. 2009-05-10 22:21:20 +00:00
lotodore 3db5c9218b Current compatibility notification is not working. The server will now send a "game full" notification if a 0.6 player tries to enter a game with > 7 max players. 2009-04-11 12:56:30 +00:00
lotodore 23ffcc8e9c Fixing backward compatibility. 2009-04-11 12:45:56 +00:00
lotodore 992dd4b618 Adding backward compatibility for 0.6 clients. They cannot join games with > 7 players. 2009-04-11 12:32:54 +00:00
lotodore d72cdb6873 One sender thread per client. Requires loads of resources. Kind of hacked, because the internal dependencies are very ugly now. Requires loads of testing. A problem might be the last packet sent by the server to a specific client before closing the connection, for example an error message. It might never even reach the client, because the sender thread is terminated before. I have not yet found a good way to fix this. 2009-01-07 21:52:16 +00:00
lotodore 77bb02113a Let the server automatically perform call/all in without the client having to provide values. 2008-12-25 21:11:05 +00:00
lotodore 89450a9a32 More work on server side vote kick. Most error handling complete now. Client side still lacking. 2008-12-07 11:04:42 +00:00
lotodore 2652625828 Started error handling for vote kick. 2008-12-06 00:18:36 +00:00
lotodore b236fa9d62 Vote kick kind of working. Only the forward case - no timeout, no error handling, no display update. 2008-11-25 22:18:17 +00:00
lotodore 78d039bac1 Next steps for voting to kick a user. 2008-11-19 23:15:38 +00:00
lotodore 1cfe551f19 More work on vote kick. Some network packets are exchanged, but still not functional. 2008-11-16 22:57:11 +00:00
lotodore 4ba76e60dd Disallow kicking from within a game. 2008-11-10 23:06:24 +00:00
lotodore 0ef69297d1 Server support for unsubscribing/resubscribing of lobby messages. Not yet used by the client. 2008-05-11 21:41:30 +00:00
lotodore 56c9dd4863 Disable test mode. 2008-04-24 22:35:59 +00:00
lotodore dd3453d364 Fixed multithreading issue with gnutls. 2008-04-24 22:11:43 +00:00
lotodore 91b62abf7b Fixed nasty synchronization bug when players leave during start of a game. Fixed netpacket error which occured occasionally during game start when only one player was left, the last player will be removed from the game now, but stay in the lobby. Added new stat to IRC bot. 2008-04-02 21:41:39 +00:00
lotodore 683e1cc51b Real timeout values. 2008-03-09 23:32:45 +00:00
lotodore d8d816f8dc Do not kick the player from the server on game admin timeout - just remove the player from the game. 2008-03-07 21:45:26 +00:00
lotodore 4bc902b229 New error messages. 2008-03-06 21:48:14 +00:00
lotodore e85eb879bb Game admin timeout in lobby (test version). 2008-03-06 20:44:37 +00:00
lotodore a3aee2b33a Reset network activity timeout only for certain packets. 2008-03-05 18:41:25 +00:00
lotodore 9f0d204f56 First test version with network timeout. Only activity timeout and global timeout, no game admin timeout yet. Set to test values (will disconnect rapidly).
Modified method for init timeout (if session cannot be established) - now using one non-modifiable timer for each session, and an additional timer which is reset whenever session data is received.
2008-03-04 23:47:45 +00:00
lotodore e28220a8ad Refactored server states - removed all thread local storage objects to ensure that they do not cause resource leaks. 2007-11-21 23:34:25 +00:00
lotodore 46b8ae54b8 Disable test mode. Oo. 2007-11-21 00:19:43 +00:00
lotodore 689b22e0b9 The sender thread has been rewritten with a new algorithm in mind. The sender should not stall any more, and no timeout is required. There are no more send priorities.
The avatar manager no longer serializes access to avatar files.
2007-11-20 23:58:24 +00:00
lotodore 8cffc9bc49 Fixed minimum raise for blind actions in network game. 2007-11-18 00:21:04 +00:00
lotodore 88c55eb68a Send minimum raise value on players action done, not players turn. This version is NOT compatible to the current internet server. 2007-11-18 00:06:14 +00:00
lotodore 7f5ff4af97 Fixed bug where computer players where displayed as numbers in lobby. 2007-11-14 22:54:47 +00:00
lotodore ef84c7b81a Fixed kick bug by letting the client reverse iterate over its cached player data when looking for a player name. Added several exceptions. 2007-11-10 22:18:31 +00:00
lotodore 26157027dc Fixed macro redefinition. Set money won in server. 2007-10-29 22:37:42 +00:00
lotodore e36d878a07 Added code to run fast test games. 2007-10-29 09:18:34 +00:00
lotodore cdea81b2ba Fixed sender again, as it did not work when sending errors. 2007-10-28 15:06:57 +00:00
lotodore fa7af40a49 Fixed a very nasty bug concerning the sender thread. SOCKETs were assumed to be kind of unique, but Windows tends to return the socket number of a socket which was just closed as new socket number in accept. This led to very strange behavior when the server was flooded with inits, because the sender thread still had entries for this socket number (which were not removed because they should just fail).
No longer use socket as key in maps, instead, use the session id. Only use the session id in the sender thread, "resolve" it to the socket only in the moment when it is needed. Outstanding requests will be detected to have an invalid session id then.
Also, as side effect, fixed an issue with two callback classes which were named the same and caused unexpected behavior.
2007-10-28 12:53:54 +00:00
lotodore e27be88942 Fixed bug when kicking during game. 2007-10-27 19:53:04 +00:00
lotodore 6b19b3291a Missing if to check for kick in server during game. 2007-10-27 19:48:31 +00:00
lotodore 07a0b8503d Fixed lobby update issue when computer players joined a game. 2007-10-21 18:36:56 +00:00
lotodore 4c56390dc7 Exceptions are now derived from std::exception and tell source code file and line. 2007-10-18 20:36:49 +00:00
floty 06a8fd5730 actual -> current ;) 2007-10-18 17:40:12 +00:00