|
SFS2X Objective-C API
1.7.13
iOS / macOS / tvOS
|
#import <ExtensionRequest.h>
Inherits BaseRequest.
Instance Methods | |
| (id) | - initWithExtCmd:params:room:isUDP: |
Class Methods | |
| (id) | + requestWithExtCmd:params:room:udp: |
| (id) | + requestWithExtCmd:params:room: |
| (id) | + requestWithExtCmd:params:udp: |
| (id) | + requestWithExtCmd:params: |
Protected Attributes | |
| NSString * | _extCmd |
| id< ISFSObject > | _params |
| id< Room > | _room |
Sends a request to a Zone or Room Extension.
Each request to an extension is characterized by two parameters:
| + (id) requestWithExtCmd: | (NSString *) | extCmd | |
| params: | (id<ISFSObject>) | params | |
| room: | (id<Room>) | room | |
| udp: | (BOOL) | udp | |
| extCmd | the command name |
| params | the custom extension request data |
| room | when specified it will send the request to the Room Extension. The user must be joined in that Room. |
| udp | whether the extension should be sent via UDP (YES) or TCP (NO) |
The following example shows usage.
SFSObject *obj = [SFSObject newInstance]; [obj putUtfString:@"m" value:@"Hello World!"]; [smartFox send:[ExtensionRequest requestWithExtCmd:@"myCmd" params:obj udp:NO]];