|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block. More...
#include "entities/Buddy.h"#include "entities/Invitation.h"#include "entities/MMOItem.h"#include "entities/MMORoom.h"#include "entities/Variable.h"#include "entities/Room.h"#include "entities/SFSObject.h"#include "entities/SFSUser.h"#include "entities/User.h"#include "net/ISocketClient.h"#include <cstdint>#include <memory>#include <optional>#include <string>#include <memory.h>#include <type_traits>#include <utility>#include <vector>Classes | |
| struct | sfs3::event::ApiEvent |
| The base of every event dispatched by the API. More... | |
| struct | sfs3::event::Connection |
| Dispatched when a connection to a SmartFoxServer 3 instance is attempted. More... | |
| struct | sfs3::event::ConnectionRetry |
| Dispatched when the connection to the server is interrupted abruptly, while the SmartFoxServer 3 HRC system is available in the Zone. More... | |
| struct | sfs3::event::ConnectionResume |
| Dispatched when the connection to the server is re-established after a temporary loss, while the SmartFoxServer 3 HRC system is available in the Zone. More... | |
| struct | sfs3::event::ConnectionLost |
| Dispatched when the connection to the server is interrupted. More... | |
| struct | sfs3::event::UdpConnection |
| Dispatched with the result of the UDP handshake. More... | |
| struct | sfs3::event::UdpConnectionLost |
| Dispatched when an active UDP connection is lost. More... | |
| struct | sfs3::event::Login |
| Dispatched after a successful login in a Zone. More... | |
| struct | sfs3::event::Logout |
| Dispatched when the current user logs out of the Zone. More... | |
| struct | sfs3::event::LoginError |
| Dispatched when the login fails. More... | |
| struct | sfs3::event::RoomAdd |
| Dispatched when a Room is created in a Group this client subscribes to, whoever created it. More... | |
| struct | sfs3::event::RoomRemove |
| Dispatched when a Room is destroyed in a Group this client subscribes to. More... | |
| struct | sfs3::event::RoomCreationError |
| Dispatched when the creation of a Room fails. More... | |
| struct | sfs3::event::RoomJoin |
| Dispatched when a Room is joined by the current user. More... | |
| struct | sfs3::event::RoomJoinError |
| Dispatched when the current user fails to join a Room. More... | |
| struct | sfs3::event::UserVariablesUpdate |
| Dispatched when one or more User Variables are updated. More... | |
| struct | sfs3::event::RoomVariablesUpdate |
| Dispatched when one or more Room Variables are updated. More... | |
| struct | sfs3::event::MMOItemVariablesUpdate |
| Dispatched when one or more MMOItem Variables are updated in the current MMORoom. More... | |
| struct | sfs3::event::UserCountChange |
| Dispatched when the number of users, players or spectators inside a Room changes. More... | |
| struct | sfs3::event::UserEnterRoom |
| Dispatched when another user enters one of the Rooms joined by the current user. More... | |
| struct | sfs3::event::UserExitRoom |
| Dispatched when one of the Rooms joined by the current user is left by another user, or by the current user himself. More... | |
| struct | sfs3::event::PlayerToSpectator |
| Dispatched when a player is turned into a spectator inside a Game Room. More... | |
| struct | sfs3::event::PlayerToSpectatorError |
| Dispatched when the current user cannot be turned from player into spectator in a Game Room. More... | |
| struct | sfs3::event::SpectatorToPlayer |
| Dispatched when a spectator is turned into a player inside a Game Room. More... | |
| struct | sfs3::event::SpectatorToPlayerError |
| Dispatched when the current user cannot be turned from spectator into player in a Game Room. More... | |
| struct | sfs3::event::ExtensionResponse |
| Dispatched when data from a server-side Extension is received. More... | |
| struct | sfs3::event::PublicMessage |
| Dispatched when a public message is received. More... | |
| struct | sfs3::event::PrivateMessage |
| Dispatched when a private message is received. More... | |
| struct | sfs3::event::ObjectMessage |
| Dispatched when an object with custom data is received from another user in one of the joined Rooms. More... | |
| struct | sfs3::event::ModeratorMessage |
| Dispatched when the current user receives a message from a moderator. More... | |
| struct | sfs3::event::AdminMessage |
| Dispatched when the current user receives a message from an administrator. More... | |
| struct | sfs3::event::BuddyMessage |
| Dispatched when a buddy message is received. More... | |
| struct | sfs3::event::BuddyListInit |
| Dispatched when the Buddy List system is initialized successfully. More... | |
| struct | sfs3::event::BuddyAdd |
| Dispatched when a buddy is added successfully to the current user's buddies list. More... | |
| struct | sfs3::event::BuddyRemove |
| Dispatched when a buddy is removed successfully from the current user's buddies list. More... | |
| struct | sfs3::event::BuddyBlock |
| Dispatched when a buddy is blocked or unblocked by the current user. More... | |
| struct | sfs3::event::BuddyOnlineStateChange |
| Dispatched when a buddy in the current user's buddies list changes his online state. More... | |
| struct | sfs3::event::BuddyVariablesUpdate |
| Dispatched when a buddy updates one or more of his Buddy Variables. More... | |
| struct | sfs3::event::BuddyError |
| Dispatched when a request related to the Buddy List system fails. More... | |
| struct | sfs3::event::PingPong |
| Dispatched when a new lag measurement is available. More... | |
| struct | sfs3::event::RoomNameChange |
| Dispatched when the name of a Room is changed. More... | |
| struct | sfs3::event::RoomNameChangeError |
| Dispatched when the name of a Room cannot be changed. More... | |
| struct | sfs3::event::RoomPasswordStateChange |
| Dispatched when the password of a Room is set, changed or removed. More... | |
| struct | sfs3::event::RoomPasswordStateChangeError |
| Dispatched when the password of a Room cannot be set, changed or removed. More... | |
| struct | sfs3::event::RoomCapacityChange |
| Dispatched when the capacity of a Room is changed. More... | |
| struct | sfs3::event::RoomCapacityChangeError |
| Dispatched when the capacity of a Room cannot be changed. More... | |
| struct | sfs3::event::UserFindResult |
| Dispatched when a users search is completed. More... | |
| struct | sfs3::event::RoomFindResult |
| Dispatched when a Rooms search is completed. More... | |
| struct | sfs3::event::RoomGroupSubscribe |
| Dispatched when a Room Group is subscribed successfully. More... | |
| struct | sfs3::event::RoomGroupSubscribeError |
| Dispatched when a Room Group cannot be subscribed. More... | |
| struct | sfs3::event::RoomGroupUnsubscribe |
| Dispatched when a Room Group is unsubscribed successfully. More... | |
| struct | sfs3::event::RoomGroupUnsubscribeError |
| Dispatched when a Room Group cannot be unsubscribed. More... | |
| struct | sfs3::event::Invitation |
| Dispatched when the current user receives an invitation from another user. More... | |
| struct | sfs3::event::InvitationReply |
| Dispatched to the inviter when one of the users he invited replies to the invitation, and when an invitation left unanswered expires. More... | |
| struct | sfs3::event::InvitationReplyError |
| Dispatched when an error occurs while the current user replies to an invitation, usually because the invitation already expired. More... | |
| struct | sfs3::event::ProximityListUpdate |
| Dispatched when the current user's proximity list changes in an MMORoom, after he or another user moved: it reports who and what entered or left his Area of Interest. More... | |
Enumerations | |
| enum class | sfs3::event::SFSEvent { } |
| The type of an event dispatched by the SmartFoxServer 3 client API. More... | |
Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block.
|
strong |
The type of an event dispatched by the SmartFoxServer 3 client API.
You register a handler for one of these types with SmartFox::addEventListener. Each type has its own payload struct, listed here: the handler receives it as an ApiEvent reference and casts it to the struct that matches the type.
| Enumerator | |
|---|---|
| CONNECTION | The result of a connection attempt.
|
| CONNECTION_LOST | The connection was lost, or closed on request.
|
| CONNECTION_RETRY | The connection dropped and the API is trying to re-establish it.
|
| CONNECTION_RESUME | The connection was re-established after a temporary loss.
|
| UDP_CONNECTION | The result of the UDP handshake.
|
| UDP_CONNECTION_LOST | An active UDP connection was lost.
|
| LOGIN | The login in a Zone succeeded.
|
| LOGIN_ERROR | The login in a Zone failed.
|
| LOGOUT | The current user logged out of the Zone.
|
| ROOM_ADD | A Room was created in one of the subscribed Groups.
|
| ROOM_REMOVE | A Room was removed from one of the subscribed Groups.
|
| ROOM_CREATION_ERROR | The creation of a Room failed.
|
| ROOM_JOIN | The current user joined a Room.
|
| ROOM_JOIN_ERROR | The current user failed to join a Room.
|
| ROOM_NAME_CHANGE | The name of a Room was changed.
|
| ROOM_NAME_CHANGE_ERROR | The name of a Room could not be changed.
|
| ROOM_PASSWORD_STATE_CHANGE | The password of a Room was set, changed or removed.
|
| ROOM_PASSWORD_STATE_CHANGE_ERROR | The password of a Room could not be changed.
|
| ROOM_CAPACITY_CHANGE | The capacity of a Room was changed.
|
| ROOM_CAPACITY_CHANGE_ERROR | The capacity of a Room could not be changed.
|
| USER_COUNT_CHANGE | The number of users or spectators in a Room changed.
|
| USER_ENTER_ROOM | Another user entered one of the joined Rooms.
|
| USER_EXIT_ROOM | A user left one of the joined Rooms.
|
| USER_VARIABLES_UPDATE | One or more User Variables were updated.
|
| ROOM_VARIABLES_UPDATE | One or more Room Variables were updated.
|
| MMOITEM_VARIABLES_UPDATE | One or more MMOItem Variables were updated.
|
| PLAYER_TO_SPECTATOR | A player was turned into a spectator.
|
| PLAYER_TO_SPECTATOR_ERROR | A player could not be turned into a spectator.
|
| SPECTATOR_TO_PLAYER | A spectator was turned into a player.
|
| SPECTATOR_TO_PLAYER_ERROR | A spectator could not be turned into a player.
|
| EXTENSION_RESPONSE | Data was received from a server-side Extension.
|
| PUBLIC_MESSAGE | A public message was received.
|
| PRIVATE_MESSAGE | A private message was received.
|
| OBJECT_MESSAGE | An object message was received.
|
| MODERATOR_MESSAGE | A message from a moderator was received.
|
| ADMIN_MESSAGE | A message from an administrator was received.
|
| BUDDY_MESSAGE | A buddy message was received.
|
| BUDDY_LIST_INIT | The Buddy List system was initialized.
|
| BUDDY_ADD | A buddy was added to the buddies list.
|
| BUDDY_REMOVE | A buddy was removed from the buddies list.
|
| BUDDY_BLOCK | A buddy was blocked or unblocked.
|
| BUDDY_ONLINE_STATE_CHANGE | A buddy changed his online state.
|
| BUDDY_VARIABLES_UPDATE | One or more Buddy Variables were updated.
|
| BUDDY_ERROR | A Buddy List request failed.
|
| PING_PONG | A new lag measurement is available.
|
| USER_FIND_RESULT | The result of a users search.
|
| ROOM_FIND_RESULT | The result of a Rooms search.
|
| ROOM_GROUP_SUBSCRIBE | A Room Group was subscribed.
|
| ROOM_GROUP_SUBSCRIBE_ERROR | A Room Group could not be subscribed.
|
| ROOM_GROUP_UNSUBSCRIBE | A Room Group was unsubscribed.
|
| ROOM_GROUP_UNSUBSCRIBE_ERROR | A Room Group could not be unsubscribed.
|
| INVITATION | An invitation was received.
|
| INVITATION_REPLY | An invited user replied to an invitation.
|
| INVITATION_REPLY_ERROR | A reply to an invitation could not be sent.
|
| PROXIMITY_LIST_UPDATE | The proximity list of an MMORoom changed.
|