SmartFox Class |
Namespace: Sfs2X
public class SmartFox
The SmartFox type exposes the following members.
| Name | Description | |
|---|---|---|
| SmartFox |
Creates a new SmartFox instance.
| |
| SmartFox(Boolean) |
Creates a new SmartFox instance.
| |
| SmartFox(UseWebSocket) |
Creates a new SmartFox instance enabling websocket communication instead of the default socket communication.
| |
| SmartFox(UseWebSocket, Boolean) |
Creates a new SmartFox instance enabling websocket communication instead of the default socket communication.
|
| Name | Description | |
|---|---|---|
| BuddyManager |
Returns a reference to the Buddy Manager.
| |
| CompressionThreshold |
Returns the current compression threshold.
| |
| Config |
Returns the client configuration details.
| |
| ConnectionMode |
Returns the current connection mode after a connection has been successfully established.
| |
| CurrentIp |
Returns the IP address or domain name of the SmartFoxServer 2X instance to which the client is connected.
| |
| CurrentPort |
Returns the TCP port of the SmartFoxServer 2X instance to which the client is connected.
| |
| CurrentZone |
Returns the Zone currently in use, if the user is already logged in.
| |
| Debug |
Indicates whether the client-server messages debug is enabled or not.
| |
| HttpUploadURI |
Returns the HTTP URI that can be used to upload files to SmartFoxServer 2X, using regular HTTP POST.
| |
| IsConnected |
Indicates whether the client is connected to the server or not.
| |
| JoinedRooms |
Returns a list of Room objects representing the Rooms currently joined by the client.
| |
| LastJoinedRoom |
Returns the object representing the last Room joined by the client, if any.
| |
| Logger |
Returns a reference to the internal Logger instance used by SmartFoxServer 2X.
| |
| MaxMessageSize |
Returns the maximum size of messages allowed by the server.
| |
| MySelf |
Returns the User object representing the client when connected to a SmartFoxServer 2X instance.
| |
| NodeId | [CLUSTER] The identifier of the cluster node which the current SmartFox instance is connected to. If the instance is not connected, a null value is returned;
| |
| RoomList |
Returns a list of Room objects representing the Rooms currently "watched" by the client.
| |
| RoomManager |
Returns a reference to the Room Manager.
| |
| SessionToken |
Returns the unique session token of the client.
| |
| ThreadSafeMode |
Sets the API to run with an event queue that needs to be processed by the client.
| |
| UdpAvailable |
Indicates whether the UPD protocol is available or not in the current runtime.
| |
| UdpInited |
Indicates whether the UDP handshake has been performed successfully or not.
| |
| UserManager |
Returns a reference to the User Manager.
| |
| Version |
Returns the current version of the SmartFoxServer 2X C# API.
|
| Name | Description | |
|---|---|---|
| AddEventListener |
Adds a delegate to a given API event type that will be used for callbacks.
| |
| AddLogListener |
Registers a delegate method for log messages callbacks.
| |
| Connect | ||
| Connect(ConfigData) |
Establishes a connection between the client and a SmartFoxServer 2X instance using a configuration object.
| |
| Connect(String) | ||
| Connect(String, Int32) |
Establishes a connection between the client and a SmartFoxServer 2X instance.
| |
| Disconnect |
Closes the connection between the client and the SmartFoxServer 2X instance.
| |
| EnableLagMonitor(Boolean) | ||
| EnableLagMonitor(Boolean, Int32) | ||
| EnableLagMonitor(Boolean, Int32, Int32) |
Enables the automatic realtime monitoring of the lag between the client and the server (round robin).
| |
| GetRoomById |
Retrieves a Room object from its id.
| |
| GetRoomByName |
Retrieves a Room object from its name.
| |
| GetRoomListFromGroup |
Retrieves the list of Rooms which are part of the specified Room Group.
| |
| InitCrypto |
Initializes the connection cryptography to protect all client-server communications with standard TLS protocol.
| |
| InitUDP | ||
| InitUDP(String) | ||
| InitUDP(String, Int32) |
Initializes the UDP protocol by performing an handshake with the server.
| |
| KillConnection |
Simulates an abrupt disconnection from the server.
| |
| LoadConfig | ||
| LoadConfig(Boolean) | ||
| LoadConfig(String) | ||
| LoadConfig(String, Boolean) |
Loads the client configuration file.
| |
| ProcessEvents |
Tells the API to process all event queues and execute the delegate callbacks.
| |
| RemoveAllEventListeners |
Removes all event listeners.
| |
| RemoveEventListener |
Removes a delegate registration for a given API event.
| |
| RemoveLogListener |
Removes a delegate method for log messages callbacks.
| |
| Send |
Sends a request to the server.
| |
| SetClientDetails |
Allows to set custom client details used to gather statistics about the client platform in the SFS2X Analytics Module.
|