| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- // Copyright (c) 2008-2023 the Urho3D project
- // License: MIT
- #pragma once
- #include "../Core/Object.h"
- namespace Urho3D
- {
- /// Server connection established.
- URHO3D_EVENT(E_SERVERCONNECTED, ServerConnected)
- {
- }
- /// Server connection disconnected.
- URHO3D_EVENT(E_SERVERDISCONNECTED, ServerDisconnected)
- {
- }
- /// Server connection failed.
- URHO3D_EVENT(E_CONNECTFAILED, ConnectFailed)
- {
- }
- /// Server connection failed because its already connected or tries to connect already.
- URHO3D_EVENT(E_CONNECTIONINPROGRESS, ConnectionInProgress)
- {
- }
- /// New client connection established.
- URHO3D_EVENT(E_CLIENTCONNECTED, ClientConnected)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- }
- /// Client connection disconnected.
- URHO3D_EVENT(E_CLIENTDISCONNECTED, ClientDisconnected)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- }
- /// Client has sent identity: identity map is in the event data.
- URHO3D_EVENT(E_CLIENTIDENTITY, ClientIdentity)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- URHO3D_PARAM(P_ALLOW, Allow); // bool
- }
- /// Client has informed to have loaded the scene.
- URHO3D_EVENT(E_CLIENTSCENELOADED, ClientSceneLoaded)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- }
- /// Unhandled network message received.
- URHO3D_EVENT(E_NETWORKMESSAGE, NetworkMessage)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- URHO3D_PARAM(P_MESSAGEID, MessageID); // int
- URHO3D_PARAM(P_DATA, Data); // Buffer
- }
- /// About to send network update on the client or server.
- URHO3D_EVENT(E_NETWORKUPDATE, NetworkUpdate)
- {
- }
- /// Network update has been sent on the client or server.
- URHO3D_EVENT(E_NETWORKUPDATESENT, NetworkUpdateSent)
- {
- }
- /// Scene load failed, either due to file not found or checksum error.
- URHO3D_EVENT(E_NETWORKSCENELOADFAILED, NetworkSceneLoadFailed)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- }
- /// Remote event: adds Connection parameter to the event data.
- URHO3D_EVENT(E_REMOTEEVENTDATA, RemoteEventData)
- {
- URHO3D_PARAM(P_CONNECTION, Connection); // Connection pointer
- }
- /// Server refuses client connection because of the ban.
- URHO3D_EVENT(E_NETWORKBANNED, NetworkBanned)
- {
- }
- /// Server refuses connection because of invalid password.
- URHO3D_EVENT(E_NETWORKINVALIDPASSWORD, NetworkInvalidPassword)
- {
- }
- /// When LAN discovery found hosted server.
- URHO3D_EVENT(E_NETWORKHOSTDISCOVERED, NetworkHostDiscovered)
- {
- URHO3D_PARAM(P_ADDRESS, Address); // String
- URHO3D_PARAM(P_PORT, Port); // int
- URHO3D_PARAM(P_BEACON, Beacon); // VariantMap
- }
- /// NAT punchtrough succeeds.
- URHO3D_EVENT(E_NETWORKNATPUNCHTROUGHSUCCEEDED, NetworkNatPunchtroughSucceeded)
- {
- URHO3D_PARAM(P_ADDRESS, Address); // String
- URHO3D_PARAM(P_PORT, Port); // int
- }
- /// NAT punchtrough fails.
- URHO3D_EVENT(E_NETWORKNATPUNCHTROUGHFAILED, NetworkNatPunchtroughFailed)
- {
- URHO3D_PARAM(P_ADDRESS, Address); // String
- URHO3D_PARAM(P_PORT, Port); // int
- }
- /// Connecting to NAT master server failed.
- URHO3D_EVENT(E_NATMASTERCONNECTIONFAILED, NetworkNatMasterConnectionFailed)
- {
- }
- /// Connecting to NAT master server succeeded.
- URHO3D_EVENT(E_NATMASTERCONNECTIONSUCCEEDED, NetworkNatMasterConnectionSucceeded)
- {
- }
- /// Disconnected from NAT master server.
- URHO3D_EVENT(E_NATMASTERDISCONNECTED, NetworkNatMasterDisconnected)
- {
- }
- }
|