Benau
7d14954012
Simpify network console
2018-02-23 14:57:59 +08:00
Benau
1023e6580e
Unregister STK server when exiting
2018-02-23 14:01:20 +08:00
Benau
33435de026
Fix lan game in localhost, also improve timer behaviour
2018-02-22 16:03:54 +08:00
Benau
1458f3ef8e
Fix wan connection, move get public address from stun to stk host
2018-02-22 15:11:07 +08:00
Benau
4ab823cfbc
Move lan network socket to thread main loop, fixed leaking of it too
...
Also call enet_deinitialize when destroy STKHost
2018-02-19 11:36:32 +08:00
Benau
0a5c1a69c7
Use shared_ptr for protocol to avoid leaking
...
With weak_ptr it's also possible to auto clear LobbyProtocol when
STKHost is shutdown
2018-02-18 12:39:05 +08:00
Benau
372753f505
Use atomic flag to start / stop listening thread
2018-02-17 11:40:48 +08:00
Benau
05f7c014dd
Create a prototype for thread-safe protocol manager
...
Using weak and shared_ptr, if !lock(), than it was atomtically
destroyed
2018-02-15 16:47:04 +08:00
Benau
46416781fa
Make it possible to restart race after going back to lobby
...
At the moment the token is reset by client after each restart
2018-02-13 15:20:55 +08:00
hiker
ecbb1db2c9
Flush buffer in case of a disconnect, which allows the server to use
...
buffered logging, which will be written when the client disappears.
2018-01-24 08:39:10 +11:00
hiker
afac848bb9
Updated documentation.
2017-11-15 16:36:21 +11:00
hiker
4fced331fe
Merge remote-tracking branch 'origin/master' into game_protocol
2017-11-10 16:08:03 +11:00
hiker
efec344738
Fixed more 64-bit related compiler warnings.
2017-04-11 22:30:57 +10:00
hiker
efeea8eeb2
More debug output.
2017-02-15 09:50:00 +11:00
hiker
dfc5c1499c
Added separate log message for disconnecting clients.
2017-01-30 08:52:41 +11:00
hiker
e5c5870564
Removed debug output.
2017-01-04 08:11:17 +11:00
hiker
4d065f67e6
Started to introduce GameProtocol (which will combine several
...
individual protocols.
2016-12-09 08:55:06 +11:00
hiker
79ad569542
Only allow LAN connections for LAN servers (previously anyone with
...
the IP address could connect, even from the outside). Added new
--public-server command line option to enable public WAN server.
2016-12-06 09:10:05 +11:00
hiker
09ca38d36e
Renamed handleLANRequest to HandleDirectSocketRequest, since the code
...
can also be used to connect to a public server (outside of the server's LAN).
2016-12-01 10:11:50 +11:00
hiker
de0f153f0c
Renamted SynchronizationProtocol to LatencyProtocol.
2016-11-28 08:45:17 +11:00
hiker
62da83317e
Fixedc compilation, renamed LobbyRoomProtocol to LobbyProtocol.
2016-11-23 18:39:59 +11:00
hiker
026e1623ec
Renamed ServerLobbyRoomProtocol to just ServerLobby, ClientLobbyRoomProtocol
...
to ClientLobby, and LobbyRoomProtocol to Lobbyprotocol.
2016-11-23 09:39:33 +11:00
hiker
09eae7e25f
Removed StartGameProtocol, and added the necessary states to the
...
Lobby rooms. Added documentation of the FSM for the ServerLobby.
2016-11-22 17:57:15 +11:00
hiker
6b1563321f
Use singleton for lobby protocols.
2016-11-18 09:08:37 +11:00
hiker
10b7dac658
Replaced static with dynamic casts, fixed docu.
2016-11-11 09:14:18 +11:00
hiker
64d2d43f5b
Disable console (for #2665 ).
2016-11-09 23:06:17 +11:00
hiker
b1f6632e5b
Changed countdown from a mixture of ms and seconds to seconds only;
...
added documentation.
2016-10-27 08:40:45 +11:00
hiker
6a578e374f
Fix LAN handling when connecting via a WAN server.
2016-10-25 07:53:52 +11:00
hiker
b59194cdf3
Add a command line option to start the network console.
2016-04-22 16:37:17 +10:00
hiker
d25f3cee25
Added time step size as parameter to each protocol's synchromous update
...
function (which is needed for interpolation later).
2016-03-19 10:24:44 +11:00
hiker
f2c26f06f1
Another refactoring of NetworkString, this time added support for sequential
...
reads, so that you don't need to specify the offset anymore (and no more
removeFromFront).
2016-03-13 13:49:43 +11:00
hiker
96bf567c2e
Merge branch 'master' of https://github.com/supertuxkart/stk-code
2016-03-11 16:46:20 +11:00
hiker
655987b992
Removed NetworkPlayerProfile field from STKPeer (since if splitscreen will
...
be supported there will be no 1:1 relationship between peer and players
anymore). All voting related protocols were extended to include the
voting player's player id (sp in future split screen player can vote
individually - though atm they would all vote for the same thing).
2016-03-11 16:42:35 +11:00
Marianne Gagnon
d0499be4b9
Update protocol to include server difficulty and mode
2016-03-10 19:25:55 -05:00
hiker
603dfe7eee
Minor code cleanup.
2016-03-09 13:18:46 +11:00
hiker
f70dfb7d5d
Fixed crashes (on VS at least) when the string printed contained
...
format characters.
2016-03-06 15:54:39 +11:00
hiker
ceb831d852
Removed STKHost::sendMessage function.
2016-02-28 16:26:48 +11:00
hiker
4b9d9cfc92
Replaced Protocol::sendMessage (which was either a send or a broadcast
...
depending on if the caller is a client or server) with explicitly named
functions.
2016-02-28 16:18:08 +11:00
hiker
58505eeb88
Started to set token in the 'lower level' functions, removing the need
...
to set the token in each protocol. Started to remove some of the
unnecessary send* functions.
2016-02-28 15:54:43 +11:00
hiker
9a16595261
Renamed NewNetworkString to NetworkString.
2016-02-28 14:58:15 +11:00
hiker
6f55877e94
Fixec various crashes.
2016-02-25 16:54:31 +11:00
hiker
9d546d4980
Use BareNetworkString to correctly decode requests-for-servers.
2016-02-25 09:49:09 +11:00
hiker
2e8ddb1c50
Added a new base class 'BareNetworkString' for NetworkString,
...
used it for some of the messages exchanged before the ProtocolManager
is started (i.e. establishment of initia connection).
2016-02-24 20:32:11 +11:00
hiker
98ba11d9ba
Started to introduce new network string. It compiles, but certainly
...
does not work yet.
2016-02-23 16:29:57 +11:00
hiker
7e6711e163
Renamged NetworkWorld to RaceEventManager (since this class is
...
not a 'world' in the sense our game modes are).
2016-02-11 09:03:51 +11:00
hiker
cebf395939
Only allow the first connected client to control the server.
2016-02-10 08:28:15 +11:00
hiker
4f12a9a66c
Prevent usage of duplicated host ids (before if hosts A and B are connected,
...
then A disconnects and C connects, B and C would have the same host id).
2016-02-02 09:52:07 +11:00
hiker
affc53fef4
Updated documentation.
2016-01-18 16:22:15 +11:00
hiker
4d28bb484f
Added host id which is used to determine local/remote players.
2016-01-11 17:08:06 +11:00
hiker
efa0f0afc9
More docs, code cleanup.
2016-01-06 08:21:48 +11:00