diff --git a/Source/GCD/GCDAsyncUdpSocket.h b/Source/GCD/GCDAsyncUdpSocket.h index 6ae9bb64..c98a4480 100644 --- a/Source/GCD/GCDAsyncUdpSocket.h +++ b/Source/GCD/GCDAsyncUdpSocket.h @@ -180,22 +180,22 @@ typedef BOOL (^GCDAsyncUdpSocketSendFilterBlock)(NSData *data, NSData *address, **/ - (instancetype)init; - (instancetype)initWithSocketQueue:(nullable dispatch_queue_t)sq; -- (instancetype)initWithDelegate:(nullable id )aDelegate delegateQueue:(nullable dispatch_queue_t)dq; -- (instancetype)initWithDelegate:(nullable id )aDelegate delegateQueue:(nullable dispatch_queue_t)dq socketQueue:(nullable dispatch_queue_t)sq NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithDelegate:(nullable id)aDelegate delegateQueue:(nullable dispatch_queue_t)dq; +- (instancetype)initWithDelegate:(nullable id)aDelegate delegateQueue:(nullable dispatch_queue_t)dq socketQueue:(nullable dispatch_queue_t)sq NS_DESIGNATED_INITIALIZER; #pragma mark Configuration -- (nullable id )delegate; -- (void)setDelegate:(nullable id )delegate; -- (void)synchronouslySetDelegate:(nullable id )delegate; +- (nullable id)delegate; +- (void)setDelegate:(nullable id)delegate; +- (void)synchronouslySetDelegate:(nullable id)delegate; - (nullable dispatch_queue_t)delegateQueue; - (void)setDelegateQueue:(nullable dispatch_queue_t)delegateQueue; - (void)synchronouslySetDelegateQueue:(nullable dispatch_queue_t)delegateQueue; -- (void)getDelegate:(id __nullable * __nullable)delegatePtr delegateQueue:(dispatch_queue_t __nullable * __nullable)delegateQueuePtr; -- (void)setDelegate:(nullable id )delegate delegateQueue:(nullable dispatch_queue_t)delegateQueue; -- (void)synchronouslySetDelegate:(nullable id )delegate delegateQueue:(nullable dispatch_queue_t)delegateQueue; +- (void)getDelegate:(id __nullable * __nullable)delegatePtr delegateQueue:(dispatch_queue_t __nullable * __nullable)delegateQueuePtr; +- (void)setDelegate:(nullable id)delegate delegateQueue:(nullable dispatch_queue_t)delegateQueue; +- (void)synchronouslySetDelegate:(nullable id)delegate delegateQueue:(nullable dispatch_queue_t)delegateQueue; /** * By default, both IPv4 and IPv6 are enabled. diff --git a/Source/GCD/GCDAsyncUdpSocket.m b/Source/GCD/GCDAsyncUdpSocket.m index 3de7841c..900ea10e 100755 --- a/Source/GCD/GCDAsyncUdpSocket.m +++ b/Source/GCD/GCDAsyncUdpSocket.m @@ -359,14 +359,14 @@ - (instancetype)initWithSocketQueue:(dispatch_queue_t)sq return [self initWithDelegate:nil delegateQueue:NULL socketQueue:sq]; } -- (instancetype)initWithDelegate:(id )aDelegate delegateQueue:(dispatch_queue_t)dq +- (instancetype)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq { LogTrace(); return [self initWithDelegate:aDelegate delegateQueue:dq socketQueue:NULL]; } -- (instancetype)initWithDelegate:(id )aDelegate delegateQueue:(dispatch_queue_t)dq socketQueue:(dispatch_queue_t)sq +- (instancetype)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQueue:(dispatch_queue_t)sq { LogTrace(); @@ -499,7 +499,7 @@ - (void)dealloc } } -- (void)setDelegate:(id )newDelegate synchronously:(BOOL)synchronously +- (void)setDelegate:(id)newDelegate synchronously:(BOOL)synchronously { dispatch_block_t block = ^{ self->delegate = newDelegate; @@ -516,12 +516,12 @@ - (void)setDelegate:(id )newDelegate synchronously:(B } } -- (void)setDelegate:(id )newDelegate +- (void)setDelegate:(id)newDelegate { [self setDelegate:newDelegate synchronously:NO]; } -- (void)synchronouslySetDelegate:(id )newDelegate +- (void)synchronouslySetDelegate:(id)newDelegate { [self setDelegate:newDelegate synchronously:YES]; } @@ -577,7 +577,7 @@ - (void)synchronouslySetDelegateQueue:(dispatch_queue_t)newDelegateQueue [self setDelegateQueue:newDelegateQueue synchronously:YES]; } -- (void)getDelegate:(id *)delegatePtr delegateQueue:(dispatch_queue_t *)delegateQueuePtr +- (void)getDelegate:(id *)delegatePtr delegateQueue:(dispatch_queue_t *)delegateQueuePtr { if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey)) { @@ -599,7 +599,7 @@ - (void)getDelegate:(id *)delegatePtr delegateQueue: } } -- (void)setDelegate:(id )newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue synchronously:(BOOL)synchronously +- (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue synchronously:(BOOL)synchronously { dispatch_block_t block = ^{ @@ -624,12 +624,12 @@ - (void)setDelegate:(id )newDelegate delegateQueue:(d } } -- (void)setDelegate:(id )newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue +- (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue { [self setDelegate:newDelegate delegateQueue:newDelegateQueue synchronously:NO]; } -- (void)synchronouslySetDelegate:(id )newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue +- (void)synchronouslySetDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue { [self setDelegate:newDelegate delegateQueue:newDelegateQueue synchronously:YES]; }