// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from libdc.djinni

#import <Foundation/Foundation.h>
@protocol DCDcErrorCallback;
@protocol DCDcEventCallback;
@protocol DCDcMessageCallback;


@interface DCDataChannel : NSObject

- (void)close;

- (BOOL)sendText:(nonnull NSString *)msg;

- (BOOL)sendBinary:(nonnull NSData *)msg;

- (BOOL)isOpen;

- (BOOL)isClosed;

- (int32_t)maxMessageSize;

- (int32_t)bufferedAmount;

- (void)onOpen:(nullable id<DCDcEventCallback>)callback;

- (void)onClosed:(nullable id<DCDcEventCallback>)callback;

- (void)onError:(nullable id<DCDcErrorCallback>)callback;

- (void)onMessage:(nullable id<DCDcMessageCallback>)callback;

- (void)onBufferedAmountLow:(nullable id<DCDcEventCallback>)callback;

- (void)setBufferedAmountLowThreshold:(int32_t)amount;

@end
