diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-09-26 00:11:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 00:11:20 +0200 |
commit | 6f1c90720402415b62fb4d5e809ec7dbc1cd7f96 (patch) | |
tree | 6f94c2bbc2d343be50945a0074bc16da282a4bc1 /src/network/networkprotocol.h | |
parent | 6df312a608912b3cb21d04532151e29e8b0c7301 (diff) | |
download | minetest-6f1c90720402415b62fb4d5e809ec7dbc1cd7f96.tar.gz minetest-6f1c90720402415b62fb4d5e809ec7dbc1cd7f96.tar.bz2 minetest-6f1c90720402415b62fb4d5e809ec7dbc1cd7f96.zip |
Implement mod communication channels (#6351)
Implement network communication for channels
* Implement ModChannel manager server side to route incoming messages from clients to other clients
* Add signal handler switch on client & ModChannelMgr on client to handle channels
* Add Lua API bindings + client packet sending + unittests
* Implement server message sending
* Add callback from received message handler to Lua API using registration method
Diffstat (limited to 'src/network/networkprotocol.h')
-rw-r--r-- | src/network/networkprotocol.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index f4258e9cd..28132396b 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -180,6 +180,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Backwards compatibility drop Add 'can_zoom' to player object properties Add glow to object properties + Mod channels */ #define LATEST_PROTOCOL_VERSION 36 @@ -611,6 +612,22 @@ enum ToClientCommand u8[len] player name */ + TOCLIENT_MODCHANNEL_MSG = 0x57, + /* + u16 channel name length + std::string channel name + u16 channel name sender + std::string channel name + u16 message length + std::string message + */ + TOCLIENT_MODCHANNEL_SIGNAL = 0x58, + /* + u8 signal id + u16 channel name length + std::string channel name + */ + TOCLIENT_SRP_BYTES_S_B = 0x60, /* Belonging to AUTH_MECHANISM_SRP. @@ -645,6 +662,26 @@ enum ToServerCommand [0] u16 TOSERVER_INIT2 */ + TOSERVER_MODCHANNEL_JOIN = 0x17, + /* + u16 channel name length + std::string channel name + */ + + TOSERVER_MODCHANNEL_LEAVE = 0x18, + /* + u16 channel name length + std::string channel name + */ + + TOSERVER_MODCHANNEL_MSG = 0x19, + /* + u16 channel name length + std::string channel name + u16 message length + std::string message + */ + TOSERVER_GETBLOCK = 0x20, // Obsolete TOSERVER_ADDNODE = 0x21, // Obsolete TOSERVER_REMOVENODE = 0x22, // Obsolete |