KGWebSocketExtension Class Reference
| Inherits from | NSObject |
| Declared in | KGWebSocketExtension.h |
Overview
KGWebSocketExtension is an abstract class that should be extended to define custom extension. The custom extension can include one or more theKGWebSocketExtensionParameter constants that defines the parameters corresponding to the custom extension.
Warning: This is an abstract class. This should not be created directly. It is inherited by the subclasses such as KGApnsExtension.
Tasks
-
– createParameter:name:type:metadata:Creates KGWebSocketExtensionParamter.
-
– parameter:Returns the KGWebSocketExtensionParameter defined in this KGWebSoketExtension with the specified name.
-
– parametersReturns KGWebSocketExtensionParameter(s) that are defined in this KGWebSocketExtension. An empty array is returned if there are no KGWebSocketExtensionParameter(s) defined.
-
– parametersWithMetadata:Returns KGWebSocketExtensionParameter(s) defined in this KGWebSocketExtension that match all the specified metadata. An empty array is returned if none of the parameter(s) defined in this class that match all the specified metadata.
-
– nameReturns the name of the extension.
-
+ extensionWithName:Returns the KGWebSocketExtension with the specified name.
Class Methods
extensionWithName:
Returns the KGWebSocketExtension with the specified name.
+ (KGWebSocketExtension *)extensionWithName:(NSString *)nameDeclared In
KGWebSocketExtension.hInstance Methods
createParameter:name:type:metadata:
Creates KGWebSocketExtensionParamter.
- (KGWebSocketExtensionParameter *)createParameter:(KGWebSocketExtension *)extension name:(NSString *)parameterName type:(Class)parameterType metadata:(NSSet *)parameterMetadataParameters
- extension
The KGWebSocketExtension instance that the parameter belongs to
- parameterName
The name of the parameter
- parameterType
Parameter type
- parameterMetadata
NSSet containing parameter metadata. The parameter metadata is one or more of following constants
1. ANONYMOUS: The name of the parameter will not be put on the wire during the handshake.
2. REQUIRED: Parameter marked as required must be set for the entire extension to be negotiated during the handshake. By default, a parameter is considered to be optional.
3. TEMPORAL: Parameter marked as temporal will not be negotiated during the handshake.
Declared In
KGWebSocketExtension.hparameter:
Returns the KGWebSocketExtensionParameter defined in this KGWebSoketExtension with the specified name.
- (KGWebSocketExtensionParameter *)parameter:(NSString *)nameDeclared In
KGWebSocketExtension.hparameters
Returns KGWebSocketExtensionParameter(s) that are defined in this KGWebSocketExtension. An empty array is returned if there are no KGWebSocketExtensionParameter(s) defined.
- (NSArray *)parametersDeclared In
KGWebSocketExtension.hparametersWithMetadata:
Returns KGWebSocketExtensionParameter(s) defined in this KGWebSocketExtension that match all the specified metadata. An empty array is returned if none of the parameter(s) defined in this class that match all the specified metadata.
- (NSArray *)parametersWithMetadata:(NSArray *)metadataDeclared In
KGWebSocketExtension.h