dataFormat (property)
The format of the data being sent.
Syntax
@property (nonatomic,readwrite,assign,getter=dataFormat,setter=setDataFormat:) int dataFormat; - (int)dataFormat; - (void)setDataFormat:(int)newDataFormat;
/* Possible Values */
DF_AUTOMATIC(0),
DF_TEXT(1),
DF_BINARY(2),
DF_PING(9),
DF_PONG(10)
public var dataFormat: WebsocketDataFormats { get {...}
set {...} }
public enum WebsocketDataFormats : Int32 { case dfAutomatic = 0 case dfText = 1 case dfBinary = 2 case dfPing = 9 case dfPong = 10 }
Default Value
0
Remarks
When data is sent over an established connection it is usually considered as text or binary data. Text data is UTF-8 encoded. Binary data has no encoding associated with it.
Possible values are:
0 (dfAutomatic - default) | The class will attempt to automatically determine the correct data format. This is suitable for most cases. |
1 (dfText) | The class will UTF-8 encode the specified data before sending. Data that has already been UTF-8 encoded may also be supplied. |
2 (dfBinary) | The class will send the data exactly as it is provided. |
9 (dfPing) | The class will send the ping with data exactly as it is provided. |
10 (dfPong) | The class will send the pong with data exactly as it is provided. |