Skip to content

Commit f15c00c

Browse files
committed
A bit of code cleanup
1 parent 23f5e8f commit f15c00c

File tree

2 files changed

+131
-92
lines changed

2 files changed

+131
-92
lines changed

GCD/GCDAsyncUdpSocket.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ typedef enum GCDAsyncUdpSocketError GCDAsyncUdpSocketError;
6161
*
6262
* GCDAsyncUdpSocketReceiveFilterBlock filter = ^BOOL (NSData *data, NSData *address, id *context) {
6363
*
64-
* MyProtocolMessage *msg = [MyProtocol parseMessage:msg];
64+
* MyProtocolMessage *msg = [MyProtocol parseMessage:data];
6565
*
6666
* *context = response;
6767
* return (response != nil);
@@ -522,7 +522,7 @@ typedef BOOL (^GCDAsyncUdpSocketReceiveFilterBlock)(NSData *data, NSData *addres
522522
*
523523
* GCDAsyncUdpSocketReceiveFilterBlock filter = ^BOOL (NSData *data, NSData *address, id *context) {
524524
*
525-
* MyProtocolMessage *msg = [MyProtocol parseMessage:msg];
525+
* MyProtocolMessage *msg = [MyProtocol parseMessage:data];
526526
*
527527
* *context = response;
528528
* return (response != nil);
@@ -534,7 +534,21 @@ typedef BOOL (^GCDAsyncUdpSocketReceiveFilterBlock)(NSData *data, NSData *addres
534534

535535
#pragma mark Closing
536536

537+
/**
538+
* Immediately closes the underlying socket.
539+
* Any pending send operations are discarded.
540+
*
541+
* The GCDAsyncUdpSocket instance may optionally be used again.
542+
* (it will setup/configure/use another unnderlying BSD socket).
543+
**/
537544
- (void)close;
545+
546+
/**
547+
* Closes the underlying socket after all pending send operations have been sent.
548+
*
549+
* The GCDAsyncUdpSocket instance may optionally be used again.
550+
* (it will setup/configure/use another unnderlying BSD socket).
551+
**/
538552
- (void)closeAfterSending;
539553

540554
#pragma mark Advanced

0 commit comments

Comments
 (0)