X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/d0e2a23f6909335baea90af08491a5160026757b..1d23d1181a753fffef7a9d28db4b0b0546bd0032:/ITInetSocket.h diff --git a/ITInetSocket.h b/ITInetSocket.h index aaf55b9..61d16b0 100755 --- a/ITInetSocket.h +++ b/ITInetSocket.h @@ -16,15 +16,6 @@ * @abstract Definitions for the ITInetSocket class */ -/*! - * @constant ITInetMaxConnections - * @abstract The maximum number of running ITInetSockets you can have. - * @discussion The socket will error during a connection request if you are over the maximum. - */ - -enum { - ITInetMaxConnections = 128 -}; /*! * @enum ITInetSocketState @@ -63,14 +54,14 @@ typedef enum { * @abstract Delegate methods for ITInetSocket * @discussion ITInetSockets use these methods to communicate with their delegates */ -@protocol ITInetSocketDelegate +@protocol ITInetSocketDelegate /*! - * @method dataRecieved: + * @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. */ -- (void) dataRecieved:(in ITInetSocket *)sender; +- (oneway void) dataReceived:(ITInetSocket *)sender; /*! * @method errorOccured:during:onSocket: * @abstract Alerts the delegate of an error condition. @@ -79,14 +70,14 @@ typedef enum { * @param state What the socket was doing when the error occured. * @param sender The socket the error occured on. */ -- (void) errorOccured:(ITInetSocketError)err during:(ITInetSocketState)state onSocket:(in ITInetSocket*)sender; +- (oneway void) errorOccured:(ITInetSocketError)err during:(ITInetSocketState)state onSocket:(ITInetSocket*)sender; /*! * @method finishedConnecting: * @abstract Alerts the delegate of a successful connection attempt. * @discussion The delegate should send whatever initial data is required for the protocol (nickname for IRC, etc.) * @param sender The socket that established the connection. */ -- (void) finishedConnecting:(in ITInetSocket *)sender; +- (oneway void) finishedConnecting:(ITInetSocket *)sender; @end /*! @@ -94,17 +85,14 @@ typedef enum { * @abstract An Internet socket class. * @discussion ITInetSocket is an Internet socket class supporting IPv6 and Rendezvous. */ -@interface ITInetSocket : NSObject { - @public - /*! - * @var sockfd - * @abstract KLWONZ - */ +@interface ITInetSocket : NSObject { + int sockfd; int port; + int nc; unsigned short bufs; - int dieflag; - int actionflag; + volatile int dieflag; + volatile int actionflag; id delegate; struct addrinfo *ai, *ai_cur; ITByteStream *readPipe, *writePipe;