git.ithinksw.org
/
ITFoundation.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9aa66ee
)
Disabling socket build for now while I revise the APIs
author
Alexander Strange
<astrange@ithinksw.com>
Wed, 19 Feb 2003 10:02:44 +0000
(10:02 +0000)
committer
Alexander Strange
<astrange@ithinksw.com>
Wed, 19 Feb 2003 10:02:44 +0000
(10:02 +0000)
ITInetSocket.h
patch
|
blob
|
history
diff --git
a/ITInetSocket.h
b/ITInetSocket.h
index
079d8ab
..
9f7d165
100755
(executable)
--- a/
ITInetSocket.h
+++ b/
ITInetSocket.h
@@
-7,29
+7,39
@@
//
#import <Foundation/Foundation.h>
//
#import <Foundation/Foundation.h>
-
-@protocol ITInetSocketOwner
-- (void)requestCompleted:(NSString*)data;
-@end
+#import <netinet/in.h>
enum {
ITInetMaxConnections = 36
};
enum {
ITInetMaxConnections = 36
};
+typedef enum {
+ ITInetSocketConnecting,
+ ITInetSocketReady,
+ ITInetSocketDisconnected
+} ITInetSocketState;
+
+@protocol ITInetSocketOwner
+- (void) requestCompleted:(in NSData*)data;
+- (void) errorOccured:(int)err during:(ITInetSocketState)state;
+- (void) finishedConnecting;
+@end
+
@interface ITInetSocket : NSObject {
@interface ITInetSocket : NSObject {
+ @public
int sockfd;
int port;
int sockfd;
int port;
- NSString *destAddr;
+ id delegate;
+ struct sockaddr_in6 sa;
+ NSMutableData *requestBuffer;
+ ITInetSocketState state;
}
// Init
}
// Init
--(id) initWithFD:(int)fd;
-(id) initWithFD:(int)fd delegate:(id)d;
-(id) initWithDelegate:(id)d;
-(id) initWithFD:(int)fd delegate:(id)d;
-(id) initWithDelegate:(id)d;
-+(NSArray*) socketsForRendezvousScan; //need args
+-(void) connectToHost:(NSString*)host onPort:(short)port;
+
+-(ITInetSocketState) state;
-// Mutators (some of these must be set before you can connect)
--(void) setPort:(int)port;
--(void) setPortViaServiceName:(NSString*)name;
--(void) setDest:(NSString*)dst;
@end
@end