Commit Graph

517 Commits (e5edaeabfd8b7fcc1d261a0767cdbb50bfaa7c5e)

Author SHA1 Message Date
Giel van Schijndel d85d317842 * Add a lobby class
* handles incoming connections from TCPServer (functions properly now)
  * uses an std::list to store GAMESTRUCTs in
  * uses ReadWriteMutex for multithreading synchronisation
  * handles "addg" requests
   * handles game persistence (with specialized "game" locks, which will die along with the connection)
  * handles "list" requests
   * dumps the entire list of current games to the user

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1645 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:01:02 +00:00
Giel van Schijndel 831dbe0c1d * Add utility class: ReadWriteMutex;
This class allows multiple readers to obtain a lock at the same time. Until a writer attempts to obtain a lock, then attempts by readers to lock will block. Also second writers that attempt to lock will block until the first releases its lock.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1644 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:57:49 +00:00
Giel van Schijndel aaac0278f5 * Handle the "list" command in a proper way by answering with a dummy game
* Add asynchronous TCP server class: TCPServer
 * Add comparison operators for SESSIONDESC and GAMESTRUCT respectively
 * Add -D_WIN32_WINNT=0x0501 to the compiletime options (needed for Boost::Asio on WinXP, 2k needs -D_WIN32_WINNT=0x0500, GNU/Linux systems define it themselves automatically)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1643 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:51:29 +00:00
Giel van Schijndel 7a0457e6e0 * Use EOF as connection and as such game termination
* move inclusion of definition of GAMESTRUCT to new header file game.hpp
  * Allow game.hpp including files to be compiled without SDL (useful for crosscompiling), by internally (in game.hpp) declaring GAMESTRUCT as well
 * Stay connected when an "addg" command is received (client needs to disconnect to indicate the game should be removed from the lobbylist)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1642 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:42:28 +00:00
Giel van Schijndel 771d1efa9e * Add a "pretty"-printing function for printing games to a terminal (through std::cout)
* switch to using IPv4 instead of IPv6 (for testing)
 * Use correct buffersize for retrieval of a command/method (5 bytes/chars right now, ought to be NUL-terminated)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1641 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:34:26 +00:00
Giel van Schijndel a2f477edcf * Add _premature_ C++ testing lobby server
(one of my first, and probably ugly, versions, going to commit incrementally till the last)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1639 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:30:22 +00:00
Giel van Schijndel 0a590a79af * Use network byte-order (big-endian) for size of game list as response to "list" command
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1629 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:19:22 +00:00
Gerard Krol 2055a59020 Fix "ghost" games, and allow for updating the game state when hosting a game without having to disconnect and reconnect.
This will have to be implemented in the game as well.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1581 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 21:01:32 +00:00
Dennis Schridde 2674023d77 New masterserver by Gerard and Kamaze
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1514 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 14:20:20 +00:00
Giel van Schijndel 0289e2664f Set executable bit, makes running the script a bit easier.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1278 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-21 00:39:11 +00:00
Christian Vest Hansen 521a12a00d * Initial upload of Python+JSON-RPC based lobby/master server.
I don't claim that this code is of outstanding quality >_>
  It was, after all, just written as a proof of concept prototype...



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1274 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-20 19:23:51 +00:00
Dennis Schridde 330fa3b3e5 Remove now unneeded binary blob reader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1191 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 01:34:33 +00:00
Dennis Schridde 8cdad4a810 - Change signalHandler to use POSIX signal safe file functions
- Reorder read_gdmp output
- Added compilation date to gdmp
- Reordered gdmp values: sysInfo now after programVersion/compileDate instead of before, to match read_gdmp display order

Still not implemented: Custom (signal safe) sprintf replacement, so we can output textfiles instead of binary blobs.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1189 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 00:15:50 +00:00
Dennis Schridde b0a422c1ea Tool to read .gdmp files created on crashes of the Linux version.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1183 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-26 15:12:20 +00:00
Giel van Schijndel bd15126db0 Added a directory to contain tools for Warzone 2100. (E.g. modelling/texturing stuff, some map editor maybe, etc.)
As per this discussion: http://wz2100.net/forum/index.php?topic=320.0

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1055 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-31 19:58:49 +00:00
No Author d17e78a713 Clear out entire repository for move of codebase from BerliOS to Gna! repository hosting.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@361 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:09:32 +00:00
Victor Qamly 84ef68c532 Adding some of the tools for this project, that never got added.
WorldEdit : only works on windows platform.  Also needs ORIGINAL libs (inculded) to compile correctly)

PiePlugin (3ds Max -> .pie converter.  Which is used for the .pie formats of 3d models used in game.

BSPIMD - Loads IMD, Generates BSP tree, saves IMD with BSP infomation.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@345 4a71c877-e1ca-e34f-864e-861f7616d084
2005-10-22 21:13:48 +00:00