Inherits from BaseRequest : NSObject
Declared in ExtensionRequest.h
ExtensionRequest.m

Overview

Sends a request to a Zone or Room Extension.

Each request to an extension is characterized by two parameters:

  • command name: any string that identifies an action that should be executed on the server side. We recommend to use the same command name for both the client request and the server response.
  • request data: you can send any simple or complex data structures to your extension(s) via the SFSObject class

Tasks

Class Methods

requestWithExtCmd:params:room:udp:

the command name

+ (id)requestWithExtCmd:(NSString *)extCmd params:(id<ISFSObject>)params room:(id<Room>)room udp:(BOOL)udp

Parameters

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] autorelease];
 [obj putUtfString:@"m" value:@"Hello World!"];
 [smartFox send:[ExtensionRequest requestWithExtCmd:@"myCmd" params:obj udp:NO]];

Declared In

ExtensionRequest.h