FMIceLinkStunErrorCodeAttribute Class Reference

Inherits from FMIceLinkStunAttribute : NSObject
Declared in FMIceLinkStunErrorCodeAttribute.h
FMIceLinkStunErrorCodeAttribute.m

Overview

The ERROR-CODE attribute is used in error response messages. It contains a numeric error [code](#//api/name/code) value in the range of 300 to 699 plus a textual [reason](#//api/name/reason) phrase encoded in UTF-8 [RFC3629], and is consistent in its [code](#//api/name/code) assignments and semantics with SIP [RFC3261] and HTTP [RFC2616]. The [reason](#//api/name/reason) phrase is meant for user consumption, and can be anything appropriate for the error [code](#//api/name/code). Recommended [reason](#//api/name/reason) phrases for the defined error codes are included in the IANA registry for error codes. The [reason](#//api/name/reason) phrase MUST be a UTF-8 [RFC3629] encoded sequence of less than 128 characters (which can be as long as 763 bytes).

– code

Gets the error code.

The code.

- (int)code

Discussion

Gets the error code.

The code.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– description

Returns a string that represents this instance.

@return A string that represents this instance.

- (NSString *)description

Discussion

Returns a string that represents this instance.

@return A string that represents this instance.

Declared In

FMIceLinkStunErrorCodeAttribute.h

+ errorCodeAttributeWithCode:

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.
+ (FMIceLinkStunErrorCodeAttribute *)errorCodeAttributeWithCode:(int)code

Parameters

code

The error code.

Discussion

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.

Declared In

FMIceLinkStunErrorCodeAttribute.h

+ errorCodeAttributeWithCode:reason:

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.
+ (FMIceLinkStunErrorCodeAttribute *)errorCodeAttributeWithCode:(int)code reason:(NSString *)reason

Parameters

code

The error code.

reason

The error reason.

Discussion

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– getValueLength

Gets the length of the attribute value.

@return

- (int)getValueLength

Discussion

Gets the length of the attribute value.

@return

Declared In

FMIceLinkStunErrorCodeAttribute.h

– initWithCode:

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.
- (instancetype)initWithCode:(int)code

Parameters

code

The error code.

Discussion

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– initWithCode:reason:

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.
- (instancetype)initWithCode:(int)code reason:(NSString *)reason

Parameters

code

The error code.

reason

The error reason.

Discussion

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.

Declared In

FMIceLinkStunErrorCodeAttribute.h

+ readValueFromWithBuffer:offset:length:

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.
+ (FMIceLinkStunErrorCodeAttribute *)readValueFromWithBuffer:(FMIceLinkDataBuffer *)buffer offset:(int)offset length:(int)length

Parameters

buffer

The buffer.

offset

The offset.

length

The length. @return

Discussion

Initializes a new instance of the FMIceLinkStunErrorCodeAttribute class.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– reason

Gets the error reason.

The reason.

- (NSString *)reason

Discussion

Gets the error reason.

The reason.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– setCode:

Sets the error [code](#//api/name/code).

The code.

- (void)setCode:(int)value

Discussion

Sets the error [code](#//api/name/code).

The code.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– setReason:

Sets the error [reason](#//api/name/reason).

The reason.

- (void)setReason:(NSString *)value

Discussion

Sets the error [reason](#//api/name/reason).

The reason.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– typeValue

Gets the type value.
- (int)typeValue

Discussion

Gets the type value.

Declared In

FMIceLinkStunErrorCodeAttribute.h

– writeValueToWithBuffer:offset:

Writes the attribute value to a data buffer.
- (void)writeValueToWithBuffer:(FMIceLinkDataBuffer *)buffer offset:(int)offset

Parameters

buffer

The buffer.

offset

The offset.

Discussion

Writes the attribute value to a data buffer.

Declared In

FMIceLinkStunErrorCodeAttribute.h