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.
-
– parameters
Returns 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.
-
– name
Returns 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 *)name
Declared In
KGWebSocketExtension.h
Instance Methods
createParameter:name:type:metadata:
Creates KGWebSocketExtensionParamter.
- (KGWebSocketExtensionParameter *)createParameter:(KGWebSocketExtension *)extension name:(NSString *)parameterName type:(Class)parameterType metadata:(NSSet *)parameterMetadata
Parameters
- 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.h
parameter:
Returns the KGWebSocketExtensionParameter defined in this KGWebSoketExtension with the specified name.
- (KGWebSocketExtensionParameter *)parameter:(NSString *)name
Declared In
KGWebSocketExtension.h
parameters
Returns KGWebSocketExtensionParameter(s) that are defined in this KGWebSocketExtension. An empty array is returned if there are no KGWebSocketExtensionParameter(s) defined.
- (NSArray *)parameters
Declared In
KGWebSocketExtension.h
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.
- (NSArray *)parametersWithMetadata:(NSArray *)metadata
Declared In
KGWebSocketExtension.h