From cfb4b455d5d7aa97ddf659d1953ea3d0196ba244 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 4 Aug 2007 00:38:07 -0700 Subject: [PATCH] Adding the sent data as the parameter to the dataSent delegate method * Source/DebuggerConnection.m: ([DebuggerConnection dataSent:]): Print the data sent with the new paramater * Source/SocketWrapper.m|h: Added a new parameter to dataSent: delegate method which contains the sent data ([SocketWrapper dataSent:]) ([SocketWrapper _sendMessageToDelegate:]) ([SocketWrapper send:]) --- Source/DebuggerConnection.m | 6 +++--- Source/SocketWrapper.h | 2 +- Source/SocketWrapper.m | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/DebuggerConnection.m b/Source/DebuggerConnection.m index 6f2db2e..b1d825b 100644 --- a/Source/DebuggerConnection.m +++ b/Source/DebuggerConnection.m @@ -105,16 +105,16 @@ { [self performSelector: selector withObject: response]; } - NSLog(@"response = %@", response); + NSLog(@"receive = %@", response); } /** * SocketWrapper delegate method that is called after data is sent. This really * isn't useful for much. */ -- (void)dataSent +- (void)dataSent: (NSString *)data { - NSLog(@"data sent"); + NSLog(@"send = %@", data); } /** diff --git a/Source/SocketWrapper.h b/Source/SocketWrapper.h index 5dda2fb..dac2af1 100644 --- a/Source/SocketWrapper.h +++ b/Source/SocketWrapper.h @@ -53,6 +53,6 @@ // data handlers - (void)dataReceived: (NSString *)response deliverTo: (SEL)selector; -- (void)dataSent; +- (void)dataSent: (NSString *)sent; @end diff --git a/Source/SocketWrapper.m b/Source/SocketWrapper.m index 607acb3..28b4f58 100644 --- a/Source/SocketWrapper.m +++ b/Source/SocketWrapper.m @@ -117,7 +117,7 @@ NSString *NsockDataSent = @"SocketWrapper_DataSent"; } else if (name == NsockDataSent) { - [_delegate dataSent]; + [_delegate dataSent: [notif object]]; } else if (name == NsockError) { @@ -281,7 +281,7 @@ NSString *NsockDataSent = @"SocketWrapper_DataSent"; NSLog(@"FAIL: only partial packet was sent; sent %d bytes", sent); } - [self _postNotification: NsockDataSent withObject: nil]; + [self _postNotification: NsockDataSent withObject: [data substringToIndex: sent]]; } /** -- 2.43.5