home *** CD-ROM | disk | FTP | other *** search
- /* Class for handling sockets in the Internet domain.
- *
- * Copyright (c) 1994 Christopher J. Kane.
- *
- * This software is subject to the terms of the MiscKit license
- * agreement. Refer to the license document included with the
- * MiscKit distribution for these terms.
- *
- * Version 1.0 BETA (26 April 1994)
- */
-
- #import <misckit/MiscSocket.h>
- #import <misckit/MiscINETAddress.h>
-
- @interface MiscINETSocket:MiscSocket
- {
- MiscINETAddress *localAddress;
- int localPortNum;
- MiscINETAddress *remoteAddress;
- int remotePortNum;
- }
-
- + sendDgram:(void *)data length:(int)dlen to:(MiscINETAddress *)addr port:(int)portNum;
- + sendDgram:(void *)data length:(int)dlen to:(MiscINETAddress *)addr service:(const char *)service;
- + (int)sendDgram:(void *)data length:(int)dlen to:(MiscINETAddress *)addr port:(int)portNum timeout:(unsigned int)ms retries:(int)retries withReply:(void *)repl length:(int *)rlen;
- + (int)sendDgram:(void *)data length:(int)dlen to:(MiscINETAddress *)addr service:(const char *)service timeout:(unsigned int)ms retries:(int)retries withReply:(void *)repl length:(int *)rlen;
-
- + (int)ping:(MiscINETAddress *)addr timeout:(unsigned int)ms useECHO:(BOOL)aBool;
-
- + runServer:(id)sockets target:(id)target action:(SEL)action fork:(BOOL)fFlag loop:(BOOL)lFlag;
-
- - (int)acceptNewConnection:(MiscINETSocket **)newSocket timeout:(unsigned int)ms;
- - connectTo:(MiscINETAddress *)addr port:(int)portNum type:(int)aType;
- - connectTo:(MiscINETAddress *)addr service:(const char *)service type:(int)aType;
- - copyFromZone:(NXZone *)zone;
- - init;
- - openServerPort:(int *)portNum type:(int)aType;
- - openServerService:(const char *)service type:(int)aType;
-
- - (int)receiveData:(void *)data length:(int *)dlen;
- - (int)receiveData:(void *)data length:(int *)dlen timeout:(unsigned int)ms from:(MiscINETAddress *)addr port:(int *)port;
- - (int)receiveData:(void *)data length:(int *)dlen timeout:(unsigned int)ms toNext:(unsigned char)sentinel;
- - sendData:(void *)data length:(int)dlen;
-
- - shutdownLocalEnd;
- - shutdownRemoteEnd;
-
- - enableDebug:(BOOL)aBool;
- - (BOOL)debugEnabled;
- - enableDelay:(BOOL)aBool;
- - (BOOL)delayEnabled;
- - enableKeepAlive:(BOOL)aBool;
- - (BOOL)keepAliveEnabled;
- - setLingerTime:(int)secs;
- - (int)lingerTime;
-
- - (BOOL)dataAvailable;
- - (MiscINETAddress *)localAddress;
- - (int)localPortNum;
- - (MiscINETAddress *)remoteAddress;
- - (int)remotePortNum;
- - (int)socketError;
-
- @end
-