fix a lot of issues on psogc; add proxy module
- $ann implemented - concurrency removed; server is now single-threaded, event-driven and much more stable - rare seed is no longer the game id; ids are sequential from server startup so they weren't random at all before - supports dropping privileges; now you can run it as root so it can open a sockets on low ports, then it will switch to the given user before serving any traffic - newserv now behaves like a proxy if you run it with the --proxy-destination=<IP_OR_HOSTNAME> argument; there's also an (invisible) shell in this mode where you can inject commands to the server or client. e.g. it can always be christmas in the lobby if you do `sc DA 01 00 00` - increased the mtu on PSODolphinConfig's tap0 configuration; this seems to make the connection more stable - fixed some uninitialized memory bugs - the shell is now event-driven and now uses libevent too; unfortunately this means readline doesn't work anymore (no history and vim-like shortcuts) - made network command display consistent for input vs. output (the header appears in both cases now) - fixed bugs in some subcommand handling (the BB logic was being applied to non-BB clients erroneously, causing most item drops not to work at all) - fixed player tags in the short lobby data struct. unclear if this was actually a problem but it was inconsistent with other servers - fixed "unused" field in game join command (actually it appears to be disable_udp and should be 1, not 0) - cleaned up Server abstraction a bit - rewrote some text functions; asan was complaining about the built-in ones for some reason - added an optional welcome message
This commit is contained in:
+11
-2
@@ -30,12 +30,19 @@
|
||||
|
||||
|
||||
|
||||
void send_command(std::shared_ptr<Client> c, uint16_t command, uint32_t flag = 0,
|
||||
void send_command(std::shared_ptr<Client> c, uint16_t command,
|
||||
uint32_t flag = 0, const void* data = NULL, size_t size = 0);
|
||||
|
||||
void send_command_excluding_client(std::shared_ptr<Lobby> l,
|
||||
std::shared_ptr<Client> c, uint16_t command, uint32_t flag = 0,
|
||||
const void* data = NULL, size_t size = 0);
|
||||
|
||||
void send_command(std::shared_ptr<Lobby> l, uint16_t command, uint32_t flag = 0,
|
||||
const void* data = NULL, size_t size = 0);
|
||||
|
||||
void send_command(std::shared_ptr<ServerState> s, uint16_t command,
|
||||
uint32_t flag = 0, const void* data = NULL, size_t size = 0);
|
||||
|
||||
template <typename TARGET, typename STRUCT>
|
||||
void send_command(std::shared_ptr<TARGET> c, uint16_t command, uint32_t flag,
|
||||
const STRUCT& data) {
|
||||
@@ -94,6 +101,7 @@ void send_lobby_message_box(std::shared_ptr<Client> c, const char16_t* text);
|
||||
void send_ship_info(std::shared_ptr<Client> c, const char16_t* text);
|
||||
void send_text_message(std::shared_ptr<Client> c, const char16_t* text);
|
||||
void send_text_message(std::shared_ptr<Lobby> l, const char16_t* text);
|
||||
void send_text_message(std::shared_ptr<ServerState> l, const char16_t* text);
|
||||
void send_chat_message(std::shared_ptr<Client> c, uint32_t from_serial_number,
|
||||
const char16_t* from_name, const char16_t* text);
|
||||
|
||||
@@ -130,7 +138,8 @@ void send_player_leave_notification(std::shared_ptr<Lobby> l,
|
||||
void send_get_player_info(std::shared_ptr<Client> c);
|
||||
|
||||
void send_arrow_update(std::shared_ptr<Lobby> l);
|
||||
void send_resume_game(std::shared_ptr<Lobby> l);
|
||||
void send_resume_game(std::shared_ptr<Lobby> l,
|
||||
std::shared_ptr<Client> ready_client);
|
||||
|
||||
enum PlayerStatsChange {
|
||||
SubtractHP = 0,
|
||||
|
||||
Reference in New Issue
Block a user