X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/1d23d1181a753fffef7a9d28db4b0b0546bd0032..af1fcfcf8c78f03127d3929b49330cc191259487:/ITInetSocket.h diff --git a/ITInetSocket.h b/ITInetSocket.h index 61d16b0..1613c69 100755 --- a/ITInetSocket.h +++ b/ITInetSocket.h @@ -55,13 +55,6 @@ typedef enum { * @discussion ITInetSockets use these methods to communicate with their delegates */ @protocol ITInetSocketDelegate -/*! - * @method dataReceived: - * @abstract Alerts the delegate of data. - * @discussion The delegate should check [sender readPipe] to get the data. - * @param sender The socket that the messages came from. - */ -- (oneway void) dataReceived:(ITInetSocket *)sender; /*! * @method errorOccured:during:onSocket: * @abstract Alerts the delegate of an error condition. @@ -86,14 +79,13 @@ typedef enum { * @discussion ITInetSocket is an Internet socket class supporting IPv6 and Rendezvous. */ @interface ITInetSocket : NSObject { - int sockfd; int port; int nc; unsigned short bufs; volatile int dieflag; volatile int actionflag; - id delegate; + id delegate; struct addrinfo *ai, *ai_cur; ITByteStream *readPipe, *writePipe; ITInetSocketState state; @@ -106,7 +98,7 @@ typedef enum { * @param type The type of Rendezvous service to listen on. * @param d The delegate that the sockets will belong to. */ -+(void)startAutoconnectingToService:(NSString*)type delegate:(id )d; ++(void)startAutoconnectingToService:(NSString*)type delegate:(id )d; /*! * @method initWithFD:delegate: * @abstract Wraps a socket around an existing socket descriptor. @@ -114,14 +106,14 @@ typedef enum { * @param fd The descriptor. * @param d The delegate for the socket. */ --(id) initWithFD:(int)fd delegate:(id )d; +-(id) initWithFD:(int)fd delegate:(id )d; /*! * @method initWithDelegate: * @abstract Creates a new socket. * @discussion The socket will not be connected to anything. * @param d The delegate of the socket. */ --(id) initWithDelegate:(id )d; +-(id) initWithDelegate:(id )d; -(id )delegate; -(unsigned short)bufferSize; @@ -132,4 +124,6 @@ typedef enum { -(ITInetSocketState) state; -(void) retryConnection; -(void) disconnect; +-(ITByteStream *)readPipe; +-(ITByteStream *)writePipe; @end