iOS SDK API Reference

SKWDataConnection.h
Go to the documentation of this file.
1 // SKWDataConnection.h
3 // SkyWay SDK
5 #import "SKWConnection.h"
6 
11 @class SKWDataChannel;
12 
13 
17 typedef NS_ENUM(NSUInteger, SKWDataConnectionEventEnum)
18 {
27 };
28 
32 typedef void (^SKWDataConnectionEventCallback)(NSObject* __nullable arg);
33 
42 
43 #ifndef DOXYGEN_SKIP_THIS
44 @property (nonatomic, readonly) id __nullable dataChannel;
46 
48 @property (nonatomic, readonly) NSUInteger bufferSize;
49 #endif // !DOXYGEN_SKIP_THIS
50 
90 - (BOOL)send:(NSObject* __nonnull)data;
91 
100 - (void)close;
101 
145 - (void)on:(SKWDataConnectionEventEnum)event callback:(__nullable SKWDataConnectionEventCallback)callback;
146 
147 @end
SKWDataConnection
Alternative class as DataConnection.
Definition: SKWDataConnection.h:41
-[SKWDataConnection close]
void close()
Closes the data connection gracefully, cleaning up underlying DataChannels and PeerConnections.
SKWConnection.h
SKW_DATACONNECTION_EVENT_ERROR
@ SKW_DATACONNECTION_EVENT_ERROR
Errors on the data conenction are almost always fatal and will destroy the data connection.
Definition: SKWDataConnection.h:26
SKW_DATACONNECTION_EVENT_CLOSE
@ SKW_DATACONNECTION_EVENT_CLOSE
Emitted when either you or the remote peer closes the data connection.
Definition: SKWDataConnection.h:24
SKWDataConnectionEventEnum
SKWDataConnectionEventEnum
Data connection event type.
Definition: SKWDataConnection.h:17
SKWDataChannel
Data channel.
Definition: SKWDataChannel.h:19
SKWDataConnectionEventCallback
void(^ SKWDataConnectionEventCallback)(NSObject *__nullable arg)
Data connection event callback signature.
Definition: SKWDataConnection.h:32
SKWConnection
Base class of SKWDataConnection and SKWMediaConnection.
Definition: SKWConnection.h:62
SKW_DATACONNECTION_EVENT_DATA
@ SKW_DATACONNECTION_EVENT_DATA
Emitted when data is received from the remote peer.
Definition: SKWDataConnection.h:22
SKW_DATACONNECTION_EVENT_OPEN
@ SKW_DATACONNECTION_EVENT_OPEN
Emitted when the connection is established and ready-to-use.
Definition: SKWDataConnection.h:20