1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
Commit Graph

47 Commits

Author SHA1 Message Date
Ivan Savenko
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
Simeon Manolov
5b6bc10131
Code review 2024-07-12 14:54:28 +03:00
Simeon Manolov
9d73b50979
Bind server to a randomly assigned port 2024-07-12 01:06:36 +03:00
Ivan Savenko
b8beb4fb13 Fixes for various minor issues detected by Sonar Cloud 2024-06-01 11:48:30 +00:00
Ivan Savenko
6f6555d19c Downgrade fatal exception to disconnection message 2024-05-19 12:54:51 +00:00
Ivan Savenko
35954dc41b Simple workaround to fix vcmiserver shutdown procedure
At the moment, vcmilobby *requires* async writes in order to handle
multiple connections with different speeds and at optimal performance,
without hanging if one player is too slow and can't eat all data server
sent to him at once.

However server (and potentially - client) can not handle this mode and
may shutdown either socket or entire asio service too early, before all
writes are performed, leading to weird freeze on ending scenario where
client would not receive notifications about end of game.
2024-05-14 19:40:20 +00:00
Ivan Savenko
da9d82b697
Merge pull request #3973 from vcmi/master
Merge master -> beta
2024-05-14 16:59:10 +03:00
Ivan Savenko
00728ded88 Report more information on exception 2024-05-14 12:48:19 +00:00
Ivan Savenko
93038b791e Fix connection termination handling 2024-05-13 14:09:59 +00:00
Ivan Savenko
6d08ec6323 More robust handling of connection errors
Fixes potentially hanging by heartbeat sockets
2024-05-12 19:13:17 +00:00
Ivan Savenko
dae3569077 Fix build 2024-05-11 16:18:21 +00:00
Ivan Savenko
0403626c93 Fix excessive calls of steady_timer::async_wait 2024-05-11 16:10:07 +00:00
Ivan Savenko
67604e1e01 Reapply "Simple implementation of heartbeat package"
This reverts commit ede92c1a9c.
2024-05-11 16:10:08 +00:00
Ivan Savenko
4c3aac8f19 Use async_write to prevent locks if receiver is too slow 2024-05-11 16:09:03 +00:00
Ivan Savenko
16f43254b5 Use async_resolve to avoid crash on resolve error 2024-05-11 13:19:07 +00:00
Ivan Savenko
66e2e13ba1 Add few more safety checks to network connection logic 2024-05-07 08:34:47 +00:00
Ivan Savenko
ede92c1a9c Revert "Simple implementation of heartbeat package"
This reverts commit 5f344e410a.
2024-05-07 08:31:08 +00:00
Ivan Savenko
5f344e410a Simple implementation of heartbeat package 2024-04-30 22:44:31 +03:00
Ivan Savenko
526ac9807b Enabled 'keepalive' option to detect dead connections 2024-04-23 17:15:59 +03:00
Andrey Filipenkov
006ec227ce [iOS] fix crash on starting game
apparently iOS can't change socket buffer size
2024-03-20 05:52:25 +03:00
Ivan Savenko
6901945b6e Fix possible thread race on sending packet from two threads 2024-02-25 20:05:28 +02:00
Ivan Savenko
779625415f Guard against concurrent writes on same asio::socket instance 2024-02-19 13:47:06 +02:00
Ivan Savenko
f620a07389 Add protocol validation 2024-02-19 13:46:07 +02:00
Ivan Savenko
d4bedd8d8d Fixed handling of match server crash 2024-02-04 19:58:09 +02:00
Ivan Savenko
7dee24edae Cleanup 2024-02-03 23:30:16 +02:00
Ivan Savenko
2c2bec791c Fixes and cleanup of game client network shutdown and restart 2024-02-03 19:27:04 +02:00
Ivan Savenko
f97ffd8e9a Better handling of disconnects, code cleanup 2024-02-02 15:32:06 +02:00
Ivan Savenko
29c0989849 Use std::byte to manage network data 2024-02-02 02:02:09 +02:00
Ivan Savenko
c5c46a7c9a Implemented connecting to server via proxy 2024-01-30 21:31:41 +02:00
Ivan Savenko
eaca128c99 Code cleanup 2024-01-26 19:15:57 +02:00
Ivan Savenko
388ca6e776 Added list of active accounts and rooms to UI. Added room creation logic 2024-01-26 16:32:36 +02:00
Ivan Savenko
baa73f5433 Code cleanup 2024-01-20 00:26:25 +02:00
Ivan Savenko
709905b1a0 Simplified networking API 2024-01-19 23:52:28 +02:00
Ivan Savenko
80e960bc8e Finalized new TCP networking API 2024-01-19 23:52:28 +02:00
Ivan Savenko
4271fb3c95 Extension of lobby server functionality
Support for:
- listing of active players
- listing of active rooms
- joining and leaving rooms
- placeholder support for multiple chat rooms
- proxy connections
- invites into private rooms

(only lobby server side for now, client and match server need work)
2024-01-19 23:49:59 +02:00
Ivan Savenko
55b504792e Implemented basic version of login window and persistent connection on
client
2024-01-19 23:49:59 +02:00
Ivan Savenko
78b7d9e726 Replaced open port check with server crash check 2024-01-19 23:49:59 +02:00
Ivan Savenko
aa7ecea683 Switch turn timers handling to boost asio timer 2024-01-19 23:49:59 +02:00
Ivan Savenko
a50cdbda0c Added timer functionality to NetworkServer
Might not be related to networking strictly speaking, but useful to have
functionality for network thread
2024-01-19 23:49:59 +02:00
Ivan Savenko
c9765a52ff Do not accept connections into ongoing game 2024-01-19 23:49:59 +02:00
Ivan Savenko
22f0ca67c6 Fix connection to game lobby & map load 2024-01-19 23:49:59 +02:00
Ivan Savenko
0a1153e1c6 Switch client-server communication to new API 2024-01-19 23:49:59 +02:00
Ivan Savenko
de5227142b Implemented message receiving / broadcasting 2024-01-19 23:49:59 +02:00
Ivan Savenko
07fb313765 Implemented loading of latest messages on joining chat 2024-01-19 23:49:59 +02:00
Ivan Savenko
f10b6df989 Implemented messages sending and storing in database 2024-01-19 23:49:59 +02:00
Ivan Savenko
dff9cf39c0 Implemented connection handling 2024-01-19 23:49:59 +02:00
Ivan Savenko
c2c43602ea Initial version of global lobby server available in client 2024-01-19 23:49:59 +02:00