NOTE: in the provided examples, smartFox always indicates a SmartFoxClient instance.
| - (void) __logout |
| - (void) addBuddy: | (NSString *) | buddyName |
Add a user to the buddy list. Since SmartFoxServer Pro 1.6.0, the buddy list feature can be configured to use a basic or advanced security mode (see the SmartFoxServer server-side configuration file). Check the following usage notes for details on the behavior of the addBuddy method in the two cases.
Basic security mode When a buddy is added, if the buddy list is already full, the onBuddyListError (INFSmartFoxISFSEvents) event is fired; otherwise the buddy list is updated and the onBuddyList (INFSmartFoxISFSEvents) event is fired.
| buddyName | : the name of the user to be added to the buddy list. |
SmartFoxServer Pro v1.6.0 - Buddy list's advanced security mode implemented.
| - (void) autoJoin |
Automatically join the the default room (if existing) for the current zone. A default room can be specified in the SmartFoxServer server-side configuration by adding the
autoJoin = "true"
SFSEvent::onJoinRoom SFSEvent::onJoinRoomError
| - (void) clearBuddyList |
Remove all users from the buddy list.
SFSEvent::onBuddyList
SmartFoxServer Pro v1.6.0 - Method deprecated.
| - (void) clearRoomList |
| - (void) connect: | (NSString *) | ipAdr | ||
| port: | (NSInteger) | port | ||
Establish a connection to SmartFoxServer. The client usually gets connected to SmartFoxServer through a socket connection. In SmartFoxServer Pro, if a socket connection is not available and the smartConnect property is set to true, an http connection to the BlueBox module is attempted. When a successful connection is established, the getConnectionMode can be used to check the current connection mode.
| ipAdr | : the SmartFoxServer ip address. | |
| port | : the SmartFoxServer TCP port (optional). |
SmartFoxServer Pro v1.6.0 - BlueBox connection attempt in case of socket connection not available.
| - (void) createRoom: | (INFSmartFoxRoomCreateParams *) | roomObj | ||
| roomId: | (NSInteger) | roomId | ||
Dynamically create a new room in the current zone.
NOTE: if the newly created room is a game room, the user is joined automatically upon successful room creation.
| roomObj | : an object with the properties described farther on. | |
| roomId | : the id of the room from where the request is originated, in case the application allows multi-room join (optional, default value: activeRoomId ). |
| name | : (String) the room name. | |
| password | : (String) a password to make the room private (optional, default: none). | |
| maxUsers | : (int) the maximum number of users that can join the room. | |
| maxSpectators | : (int) in game rooms only, the maximum number of spectators that can join the room (optional, default value: 0). | |
| isGame | : (Boolean) if true, the room is a game room (optional, default value: false). | |
| exitCurrentRoom | : (Boolean) if true and in case of game room, the new room is joined after creation (optional, default value: true). | |
| uCount | : (Boolean) if true, the new room will receive the onUserCountChange (INFSmartFoxISFSEvents) notifications (optional, default <u>recommended</u> value: false). | |
| vars | : (Array) an array of Room Variables, as described in the setRoomVariables method documentation (optional, default: none). | |
| extension | : (Object) which extension should be dynamically attached to the room, as described farther on (optional, default: none). |
| name | : (String) the name used to reference the extension (see the SmartFoxServer server-side configuration). | |
| script | : (String) the file name of the extension script (for Actionscript and Python); if Java is used, the fully qualified name of the extension must be provided. The file name is relative to the root of the extension folder ("sfsExtensions/" for Actionscript and Python, "javaExtensions/" for Java). |
| - (void) debugMessage: | (NSString *) | message |
| - (void) disconnect |
Close the current connection to SmartFoxServer.
SFSEvent::onConnectionLost
| - (INFSmartFoxRoom *) getActiveRoom |
Get the currently active INFSmartFoxRoom object. SmartFoxServer allows users to join two or more rooms at the same time (multi-room join). If this feature is used, then this method is useless and the application should track the various room id(s) manually, for example by keeping them in an array.
| - (NSMutableDictionary *) getAllRooms |
Get the list of rooms in the current zone. Unlike the getRoomList method, this method returns the list of INFSmartFoxRoom objects already stored on the client, so no request is sent to the server.
| - (NSInteger) getBenchStartTime |
| - (INFSmartFoxBuddy *) getBuddyById: | (NSInteger) | id |
| - (INFSmartFoxBuddy *) getBuddyByName: | (NSString *) | buddyName |
Get a buddy from the buddy list, using the buddy's username as key. Refer to the buddyList property for a description of the buddy object's properties.
| buddyName | : the username of the buddy. |
| - (void) getBuddyRoom: | (INFSmartFoxBuddy *) | buddy |
Request the room id(s) of the room(s) where a buddy is currently located into.
| buddy | : a buddy object taken from the buddyList array. |
| - (NSString *) getConnectionMode |
Get the current connection mode.
INFSMARTFOXCLIENT_CONNECTION_MODE_SOCKET
| - (void) getRandomKey |
Retrieve a random string key from the server. This key is also referred in the SmartFoxServer documentation as the "secret key". It's a unique key, valid for the current session only. It can be used to create a secure login system.
SFSEvent::onRandomKey
| - (INFSmartFoxRoom *) getRoom: | (NSInteger) | roomId |
Get a INFSmartFoxRoom object, using its id as key.
| roomId | : the id of the room. |
| - (INFSmartFoxRoom *) getRoomByName: | (NSString *) | roomName |
Get a INFSmartFoxRoom object, using its name as key.
| roomName | : the name of the room. |
| - (void) getRoomList |
Retrieve the updated list of rooms in the current zone. Unlike the getAllRooms method, this method sends a request to the server, which then sends back the complete list of rooms with all their properties and server-side variables (Room Variables).
If the default login mechanism provided by SmartFoxServer is used, then the updated list of rooms is received right after a successful login, without the need to call this method. Instead, if a custom login handler is implemented, the room list must be manually requested to the server using this method.
SFSEvent::onRoomListUpdate
| - (NSString *) getUploadPath |
Get the default upload path of the embedded webserver.
| - (NSString *) getVersion |
Get the SmartFoxServer Flash API version.
| - (id) initWithParams: | (BOOL) | debug | ||
| delegate: | (id <INFSmartFoxISFSEvents>) | delegate | ||
The SmartFoxClient contructor.
| debug | : turn on the debug messages (optional). | |
| delegate | : specifies the delegate object which will receive events.(optional). |
| + (id) iPhoneClient: | (BOOL) | debug | ||
| delegate: | (id <INFSmartFoxISFSEvents>) | delegate | ||
| - (void) joinRoom: | (id) | newRoom | ||
| pword: | (NSString *) | pword | ||
| isSpectator: | (BOOL) | isSpectator | ||
| dontLeave: | (BOOL) | dontLeave | ||
| oldRoom: | (NSInteger) | oldRoom | ||
Join a room.
| newRoom | : the name (String) or the id (int) of the room to join. | |
| pword | : the room's password, if it's a private room (optional). | |
| isSpectator | : a boolean flag indicating wheter you join as a spectator or not (optional). | |
| dontLeave | : a boolean flag indicating if the current room must be left after successfully joining the new room (optional). | |
| oldRoom | : the id of the room to leave (optional, default value: activeRoomId ). NOTE: the last two optional parameters enable the advanced multi-room join feature of SmartFoxServer, which allows a user to join two or more rooms at the same time. If this feature is not required, the parameters can be omitted. |
| - (void) leaveRoom: | (NSInteger) | roomId |
Disconnect the user from the given room. This method should be used only when users are allowed to be present in more than one room at the same time (multi-room join feature).
| roomId | : the id of the room to leave. |
| - (void) loadBuddyList |
Load the buddy list for the current user.
SFSEvent::onBuddyList SFSEvent::onBuddyListError
| - (void) loadConfig: | (NSString *) | configFile | ||
| autoConnect: | (BOOL) | autoConnect | ||
Load a client configuration file. The SmartFoxClient instance can be configured through an external xml configuration file loaded at run-time. By default, the loadConfig method loads a file named "config.xml", placed in the same folder of the application swf file. If the autoConnect parameter is set to true, on loading completion the connect method is automatically called by the API, otherwise the onConfigLoadSuccess (INFSmartFoxISFSEvents) event is dispatched. In case of loading error, the onConfigLoadFailure (INFSmartFoxISFSEvents) event id fired.
NOTE: the SmartFoxClient configuration file (client-side) should not be confused with the SmartFoxServer configuration file (server-side).
The external xml configuration file has the following structure; ip, port and zone parameters are mandatory, all other parameters are optional.
<SmartFoxClient>
<ip>127.0.0.1</ip>
<port>9339</port>
<zone>simpleChat</zone>
<debug>true</debug>
<blueBoxIpAddress>127.0.0.1</blueBoxIpAddress>
<blueBoxPort>9339</blueBoxPort>
<smartConnect>true</smartConnect>
<httpPort>8080</httpPort>
<httpPollSpeed>750</httpPollSpeed>
<rawProtocolSeparator>%</rawProtocolSeparator>
</SmartFoxClient>
| configFile | : external xml configuration file name (optional). | |
| autoConnect | : a boolean flag indicating if the connection to SmartFoxServer must be attempted upon configuration loading completion (optional). |
| - (void) login: | (NSString *) | zone | ||
| name: | (NSString *) | name | ||
| pass: | (NSString *) | pass | ||
Perform the default login procedure. The standard SmartFoxServer login procedure accepts guest users. If a user logs in with an empty username, the server automatically creates a name for the client using the format guest_n, where n is a progressive number. Also, the provided username and password are checked against the moderators list (see the SmartFoxServer server-side configuration) and if a user matches it, he is set as a Moderator.
NOTE 1: duplicate names in the same zone are not allowed.
NOTE 2: for SmartFoxServer Basic, where a server-side custom login procedure can't be implemented due to the lack of extensions support, a custom client-side procedure can be used, for example to check usernames against a database using a php/asp page. In this case, this should be done BEFORE calling the login method. This way, once the client is validated, the stadard login procedure can be used.
| zone | : the name of the zone to log into. | |
| name | : the user name. | |
| pass | : the user password. |
| - (void) logout |
Log the user out of the current zone. After a successful logout the user is still connected to the server, but he/she has to login again into a zone, in order to be able to interact with the server.
SFSEvent::onLogout
| - (void) removeBuddy: | (NSString *) | buddyName |
Remove a buddy from the buddy list. Since SmartFoxServer Pro 1.6.0, the buddy list feature can be configured to use a basic or advanced security mode (see the SmartFoxServer server-side configuration file). Check the following usage notes for details on the behavior of the removeBuddy method in the two cases.
Basic security mode When a buddy is removed, the buddy list is updated and the onBuddyList (INFSmartFoxISFSEvents) event is fired.
| buddyName | : the name of the user to be removed from the buddy list. |
SmartFoxServer Pro v1.6.0 - Buddy list's advanced security mode implemented.
| - (void) roundTripBench |
Send a roundtrip request to the server to test the connection' speed. The roundtrip request sends a small packet to the server which immediately responds with another small packet, and causing the onRoundTripResponse (INFSmartFoxISFSEvents) event to be fired. The time taken by the packet to travel forth and back is called "roundtrip time" and can be used to calculate the average network lag of the client. A good way to measure the network lag is to send continuos requests (every 3 or 5 seconds) and then calculate the average roundtrip time on a fixed number of responses (i.e. the last 10 measurements).
SFSEvent::onRoundTripResponse
| - (void) sendBuddyPermissionResponse: | (BOOL) | allowBuddy | ||
| targetBuddy: | (NSString *) | targetBuddy | ||
Grant current user permission to be added to a buddy list. If the SmartFoxServer Pro 1.6.0 advanced security mode is used (see the SmartFoxServer server-side configuration), when a user wants to add a buddy to his/her buddy list, a permission request is sent to the buddy. Once the onBuddyPermissionRequest (INFSmartFoxISFSEvents) event is received, this method must be used by the buddy to grant or refuse permission. When the permission is granted, the requester's buddy list is updated.
| allowBuddy | : true to grant permission, false to refuse to be added to the requester's buddy list. | |
| targetBuddy | : the username of the requester. |
| - (void) sendModeratorMessage: | (NSString *) | message | ||
| type: | (NSString *) | type | ||
| id: | (NSInteger) | id | ||
Send a Moderator message to the current zone, the current room or a specific user in the current room. In order to send these kind of messages, the user must have Moderator's privileges, which are set by SmartFoxServer when the user logs in (see the INFSmartFoxiPhoneClient#login:name:pass: method).
| message | : the text of the message. | |
| type | : the type of message. The following constants can be passed: INFSMARTFOX_MODMSG_TO_USER, INFSMARTFOX_MODMSG_TO_ROOM and INFSMARTFOX_MODMSG_TO_ZONE, to send the message to a user, to the current room or to the entire current zone respectively. | |
| id | : the id of the recipient room or user (ignored if the message is sent to the zone). |
INFSMARTFOXCLIENT_MODMSG_TO_USER
INFSMARTFOXCLIENT_MODMSG_TO_ROOM
| - (void) sendObject: | (NSDictionary *) | obj | ||
| roomId: | (NSInteger) | roomId | ||
Send an Actionscript object to the other users in the current room. This method can be used to send complex/nested data structures to clients, like a game move or a game status change. Supported data types are: Strings, Booleans, Numbers, Arrays, Objects.
| obj | : the Actionscript object to be sent. | |
| roomId | : the id of the target room, in case of multi-room join (optional, default value: activeRoomId ). |
| - (void) sendObjectToGroup: | (NSMutableDictionary *) | obj | ||
| userList: | (NSArray *) | userList | ||
| roomId: | (NSInteger) | roomId | ||
Send an Actionscript object to a group of users in the room. See sendObject for more info.
| obj | : the Actionscript object to be sent. | |
| userList | : an array containing the id(s) of the recipients. | |
| roomId | : the id of the target room, in case of multi-room join (optional, default value: activeRoomId ). |
| - (void) sendPrivateMessage: | (NSString *) | message | ||
| recipientId: | (NSInteger) | recipientId | ||
| roomId: | (NSInteger) | roomId | ||
Send a private message to a user. The message is broadcasted to the recipient and the sender.
| message | : the text of the private message. | |
| recipientId | : the id of the recipient user. | |
| roomId | : the id of the room from where the message is sent, in case of multi-room join (optional, default value: activeRoomId ). |
| - (void) sendPublicMessage: | (NSString *) | message | ||
| roomId: | (NSInteger) | roomId | ||
Send a public message. The message is broadcasted to all users in the current room, including the sender.
| message | : the text of the public message. | |
| roomId | : the id of the target room, in case of multi-room join (optional, default value: activeRoomId ). |
| - (void) sendString: | (NSString *) | strMessage |
| - (void) sendXtMessage: | (NSString *) | xtName | ||
| cmd: | (NSString *) | cmd | ||
| paramObj: | (NSDictionary *) | paramObj | ||
| type: | (NSString *) | type | ||
| roomId: | (NSInteger) | roomId | ||
Send a request to a server side extension. The request can be serialized using three different protocols: XML, JSON and String-based (aka "raw protocol"). XML and JSON can both serialize complex objects with any level of nested properties, while the String protocol allows to send linear data delimited by a separator (see the rawProtocolSeperator property).
NOTE: the use JSON instead of XML is highly recommended, as it can save a lot of bandwidth. The String-based protocol can be very useful for realtime applications/games where reducing the amount of data is the highest priority.
| xtName | : the name of the extension (see also the INFSmartFoxiPhoneClient#createRoom:roomId: method). | |
| cmd | : the name of the action/command to execute in the extension. | |
| paramObj | : an object containing the data to be passed to the extension (set to empty object if no data is required). | |
| type | : the protocol to be used for serialization (optional). The following constants can be passed: INFSMARTFOX_XTMSG_TYPE_XML, INFSMARTFOX_XTMSG_TYPE_STR, INFSMARTFOX_XTMSG_TYPE_JSON. | |
| roomId | : the id of the room where the request was originated, in case of multi-room join (optional, default value: activeRoomId ). |
INFSMARTFOXCLIENT_XTMSG_TYPE_XML
INFSMARTFOXCLIENT_XTMSG_TYPE_JSON
| - (void) setBuddyBlockStatus: | (NSString *) | buddyName | ||
| status: | (BOOL) | status | ||
Block or unblock a user in the buddy list. When a buddy is blocked, SmartFoxServer does not deliver private messages from/to that user.
| buddyName | : the name of the buddy to be blocked or unblocked. | |
| status | : true to block the buddy, false to unblock the buddy. |
| - (void) setBuddyVariables: | (NSDictionary *) | varList |
Set the current user's Buddy Variables. This method allows to set a number of properties of the current user as buddy of other users; in other words these variables will be received by the other users who have the current user as a buddy.
Buddy Variables are the best way to share user's informations with all the other users having him/her in their buddy list.: for example the nickname, the current audio track the user is listening to, etc. The most typical usage is to set a variable containing the current user status, like "available", "occupied", "away", "invisible", etc.).
NOTE: before the release of SmartFoxServer Pro v1.6.0, Buddy Variables could not be stored, and existed during the user session only. SmartFoxServer Pro v1.6.0 introduced the ability to persist (store) all Buddy Variables and the possibility to save "offline Buddy Variables" (see the following usage notes).
Let's assume that three users (A, B and C) use an "istant messenger"-like application, and user A is part of the buddy lists of users B and C. If user A sets his own variables (using the setBuddyVariables method), the myBuddyVars array on his client gets populated and a onBuddyListUpdate (INFSmartFoxISFSEvents) event is dispatched to users B and C. User B and C can then read those variables in their own buddy lists by means of the variables property on the buddy object (which can be retrieved from the buddyList array by means of the getBuddyById or getBuddyByName methods).
| varList | : an associative array, where the key is the name of the variable and the value is the variable's value. Buddy Variables should all be strings. If you need to use other data types you should apply the appropriate type casts. |
SmartFoxServer Pro v1.6.0 - Buddy list's advanced security mode implemented (persistent and offline Buddy Variables).
| - (void) setRoomVariables: | (NSArray *) | varList | ||
| roomId: | (NSInteger) | roomId | ||
| setOwnership: | (BOOL) | setOwnership | ||
Set one or more Room Variables. Room Variables are a useful feature to share data across the clients, keeping it in a centralized place on the server. When a user sets/updates/deletes one or more Room Variables, all the other users in the same room are notified. Allowed data types for Room Variables are Numbers, Strings and Booleans; in order save bandwidth, Arrays and Objects are not supported. Nevertheless, an array of values can be simulated, for example, by using an index in front of the name of each variable (check one of the following examples). If a Room Variable is set to null, it is deleted from the server.
| varList | : an array of objects with the properties described farther on. | |
| roomId | : the id of the room where the variables should be set, in case of molti-room join (optional, default value: activeRoomId ). | |
| setOwnership | : false to prevent the Room Variable change ownership when its value is modified by another user (optional). |
| name | : (String) the variable name. | |
| val | : (*) the variable value. | |
| priv | : (Boolean) if true, the variable can be modified by its creator only (optional, default value: false). | |
| persistent | : (Boolean) if true, the variable will exist until its creator is connected to the current zone; if false, the variable will exist until its creator is connected to the current room (optional, default value: false). |
| - (void) setUserVariables: | (NSDictionary *) | varObj | ||
| roomId: | (NSInteger) | roomId | ||
Set on or more User Variables. User Variables are a useful tool to store user data that has to be shared with other users. When a user sets/updates/deletes one or more User Variables, all the other users in the same room are notified. Allowed data types for User Variables are Numbers, Strings and Booleans; Arrays and Objects are not supported in order save bandwidth. If a User Variable is set to null, it is deleted from the server. Also, User Variables are destroyed when their owner logs out or gets disconnected.
| varObj | : an object in which each property is a variable to set/update. | |
| roomId | : the room id where the request was originated, in case of molti-room join (optional, default value: activeRoomId ). |
| - (void) switchSpectator: | (NSInteger) | roomId |
Turn a spectator inside a game room into a player. All spectators have their player id property set to -1; when a spectator becomes a player, his player id gets a number > 0, representing the player number. The player id values are assigned by the server, based on the order in which the players joined the room. If the user joined more than one room, the id of the room where the switch should occurr must be passed to this method. The switch operation is successful only if at least one player slot is available in the room.
| roomId | : the id of the room where the spectator should be switched, in case of molti-room join (optional, default value: activeRoomId ). |
| - (NSInteger) _activeRoomId |
The property stores the id of the last room joined by the current user. In most multiuser applications users can join one room at a time: in this case this property represents the id of the current room. If multi-room join is allowed, the application should track the various id(s) in an array (for example) and this property should be ignored.
| - (BOOL) _amIModerator |
A boolean flag indicating if the user is recognized as Moderator.
| - (NSString*) _blueBoxIpAddress |
The BlueBox IP address.
| - (NSInteger) _blueBoxPort |
The BlueBox connection port.
| - (NSMutableDictionary*) _buddyList |
An array containing the objects representing each buddy of the user's buddy list. The buddy list can be iterated with a for-in loop, or a specific object can be retrieved by means of the getBuddyById and getBuddyByName methods.
NOTE: this property and all the buddy-related method are available only if the buddy list feature is enabled for the current zone. Check the SmartFoxServer server-side configuration.
Each element in the buddy list is an object with the following properties:
| id | : (int) the buddy id. | |
| name | : (String) the buddy name. | |
| isOnline | : (Boolean) the buddy online status: true if the buddy is online; false if the buddy is offline. | |
| isBlocked | : (Boolean) the buddy block status: true if the buddy is blocked; false if the buddy is not blocked; when a buddy is blocked, SmartFoxServer does not deliver private messages from/to that user. | |
| variables | : (Object) an object with extra properties of the buddy (Buddy Variables); see also setBuddyVariables . |
| - (BOOL) _changingRoom |
A boolean flag indicating if the process of joining a new room is in progress.
| - (BOOL) _debug |
Toggle the client-side debugging informations. When turned on, the developer is able to inspect all server messages that are sent and received by the client in the Flash authoring environment. This allows a better debugging of the interaction with the server during application developement.
| - (NSString*) _defaultZone |
| - (NSInteger) _httpPort |
The TCP port used by the embedded webserver. The default port is 8080; if the webserver is listening on a different port number, this property should be set to that value.
| - (NSString*) _ipAddress |
| - (NSMutableDictionary*) _myBuddyVars |
The current user's Buddy Variables. This is an associative array containing the current user's properties when he/she is present in the buddy lists of other users. See the setBuddyVariables method for more details.
| - (NSInteger) _myUserId |
The current user's SmartFoxServer id. The id is assigned to a user on the server-side as soon as the client connects to SmartFoxServer successfully.
NOTE: client-side, the myUserId property is available only after a successful login is performed using the default login procedure. If a custom login process is implemented, this property must be manually set after the successful login! If not, various client-side modules (SmartFoxBits, RedBox, etc.) may not work properly.
| - (NSString*) _myUserName |
The current user's SmartFoxServer username.
NOTE: client-side, the myUserName property is available only after a successful login is performed using the default login procedure. If a custom login process is implemented, this property must be manually set after the successful login! If not, various client-side modules (SmartFoxBits, RedBox, etc.) may not work properly.
| - (NSInteger) _playerId |
The current user's id as a player in a game room. The playerId is available only after the user successfully joined a game room. This id is 1-based (player 1, player 2, etc.), but if the user is a spectator or the room is not a game room, its value is -1. When a user joins a game room, a player id (or "slot") is assigned to him/her, based on the slots available in the room at the moment in which the user entered it; for example:
NOTE: if multi-room join is allowed, this property contains only the last player id assigned to the user, and so it's useless. In this case the getMyPlayerIndex method should be used to retrieve the player id for each joined room.
| - (NSInteger) _port |
The SmartFoxServer connection port. The default port is 9339.
| - (BOOL) _smartConnect |
A boolean flag indicating if the BlueBox http connection should be used in case a socket connection is not available. The default value is true.
- (NSInteger) activeRoomId [read, write, assign] |
- (BOOL) amIModerator [read, write, assign] |
- (NSMutableDictionary*) buddyList [read, assign] |
- (BOOL) changingRoom [read, write, assign] |
- (id<INFSmartFoxISFSEvents>) delegate [read, assign] |
- (NSInteger) httpPollSpeed [read, write, assign] |
The minimum interval between two polling requests when connecting to SmartFoxServer via BlueBox module. The default value is 750 milliseconds. Accepted values are between 0 and 10000 milliseconds (10 seconds).
Which is the optimal value for polling speed? A value between 750-1000 ms is very good for chats, turn-based games and similar kind of applications. It adds minimum lag to the client responsiveness and it keeps the server CPU usage low. Lower values (200-500 ms) can be used where a faster responsiveness is necessary. For super fast real-time games values between 50 ms and 100 ms can be tried. With settings < 200 ms the CPU usage will grow significantly as the http connection and packet wrapping/unwrapping is more expensive than using a persistent connection. Using values below 50 ms is not recommended.
- (NSString *) INFSMARTFOXCLIENT_CONNECTION_MODE_DISCONNECTED [read, assign] |
Connection mode: "disconnected". The client is currently disconnected from SmartFoxServer.
- (NSString *) INFSMARTFOXCLIENT_CONNECTION_MODE_HTTP [read, assign] |
Connection mode: "http". The client is currently connected to SmartFoxServer via http.
- (NSString *) INFSMARTFOXCLIENT_CONNECTION_MODE_SOCKET [read, assign] |
Connection mode: "socket". The client is currently connected to SmartFoxServer via socket.
- (NSInteger) INFSMARTFOXCLIENT_EOM [read, assign] |
- (NSString *) INFSMARTFOXCLIENT_MODMSG_TO_ROOM [read, assign] |
Moderator message type: "to room". The Moderator message is sent to all the users in a room.
- (NSString *) INFSMARTFOXCLIENT_MODMSG_TO_USER [read, assign] |
Moderator message type: "to user". The Moderator message is sent to a single user.
- (NSString *) INFSMARTFOXCLIENT_MODMSG_TO_ZONE [read, assign] |
Moderator message type: "to zone". The Moderator message is sent to all the users in a zone.
- (NSString *) INFSMARTFOXCLIENT_MSG_JSON [read, assign] |
- (NSString *) INFSMARTFOXCLIENT_MSG_XML [read, assign] |
- (NSString *) INFSMARTFOXCLIENT_XTMSG_TYPE_JSON [read, assign] |
Server-side extension request/response protocol: JSON.
- (NSString *) INFSMARTFOXCLIENT_XTMSG_TYPE_STR [read, assign] |
Server-side extension request/response protocol: String (aka "raw protocol").
- (NSString *) INFSMARTFOXCLIENT_XTMSG_TYPE_XML [read, assign] |
Server-side extension request/response protocol: XML.
- (BOOL) isConnected [read, write, assign] |
A boolean flag indicating if the current user is connected to the server.
- (mach_timebase_info_data_t) mach_timebase_info_data [read, assign] |
- (NSMutableDictionary*) myBuddyVars [read, assign] |
- (NSInteger) myUserId [read, write, assign] |
- (NSString*) myUserName [read, write, retain] |
- (NSInteger) playerId [read, write, assign] |
- (NSString *) rawProtocolSeparator [read, write, assign] |
Get/set the character used as separator for the String (raw) protocol. The default value is % (percentage character).
NOTE: this separator must match the one set in the SmartFoxServer server-side configuration file through the <RawProtocolSeparator> parameter.
1.5.8