struct libwebrtc_data_channel* libwebrtc_create_channel( struct libwebrtc_connection* c, const char* name ) { ILibWrapper_WebRTC_Connection connection = (ILibWrapper_WebRTC_Connection)c; if( ! ILibWrapper_WebRTC_Connection_IsConnected( connection ) ) return NULL; ILibWrapper_WebRTC_DataChannel* channel = ILibWrapper_WebRTC_DataChannel_Create(connection, (char*)name, strlen(name), &WebRTCOnDataChannelAck ); // Initially use parent user_data ILibWrapper_WebRTC_Connection_GetUserData(connection, NULL, NULL, &channel->userData); return (libwebrtc_data_channel*)channel; }
// Non zero value if the underlying SCTP session is established __declspec(dllexport) int ILibWrapper_DLL_WebRTC_Connection_IsConnected(ILibWrapper_WebRTC_Connection connection) { return(ILibWrapper_WebRTC_Connection_IsConnected(connection)); }