@@ -61,7 +61,7 @@ typedef enum GCDAsyncUdpSocketError GCDAsyncUdpSocketError;
61
61
*
62
62
* GCDAsyncUdpSocketReceiveFilterBlock filter = ^BOOL (NSData *data, NSData *address, id *context) {
63
63
*
64
- * MyProtocolMessage *msg = [MyProtocol parseMessage:msg ];
64
+ * MyProtocolMessage *msg = [MyProtocol parseMessage:data ];
65
65
*
66
66
* *context = response;
67
67
* return (response != nil);
@@ -522,7 +522,7 @@ typedef BOOL (^GCDAsyncUdpSocketReceiveFilterBlock)(NSData *data, NSData *addres
522
522
*
523
523
* GCDAsyncUdpSocketReceiveFilterBlock filter = ^BOOL (NSData *data, NSData *address, id *context) {
524
524
*
525
- * MyProtocolMessage *msg = [MyProtocol parseMessage:msg ];
525
+ * MyProtocolMessage *msg = [MyProtocol parseMessage:data ];
526
526
*
527
527
* *context = response;
528
528
* return (response != nil);
@@ -534,7 +534,21 @@ typedef BOOL (^GCDAsyncUdpSocketReceiveFilterBlock)(NSData *data, NSData *addres
534
534
535
535
#pragma mark Closing
536
536
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
+ **/
537
544
- (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
+ **/
538
552
- (void )closeAfterSending ;
539
553
540
554
#pragma mark Advanced
0 commit comments