home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.bin / SourceCode / MiscKit1.2.6 / Headers / misckit / MiscINETSocket.h < prev    next >
Encoding:
Text File  |  1994-05-15  |  2.3 KB  |  65 lines

  1. /*  Class for handling sockets in the Internet domain.
  2.  *
  3.  *  Copyright (c) 1994 Christopher J. Kane.
  4.  *
  5.  *  This software is subject to the terms of the MiscKit license
  6.  *  agreement. Refer to the license document included with the
  7.  *  MiscKit distribution for these terms.
  8.  *
  9.  *  Version 1.0 BETA (26 April 1994)
  10.  */
  11.  
  12. #import <misckit/MiscSocket.h>
  13. #import <misckit/MiscINETAddress.h>
  14.  
  15. @interface MiscINETSocket:MiscSocket
  16. {
  17.     MiscINETAddress *localAddress;
  18.     int localPortNum;
  19.     MiscINETAddress *remoteAddress;
  20.     int remotePortNum;
  21. }
  22.  
  23. + sendDgram:(void *)data length:(int)dlen to:(MiscINETAddress *)addr port:(int)portNum;
  24. + sendDgram:(void *)data length:(int)dlen to:(MiscINETAddress *)addr service:(const char *)service;
  25. + (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;
  26. + (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;
  27.  
  28. + (int)ping:(MiscINETAddress *)addr timeout:(unsigned int)ms useECHO:(BOOL)aBool;
  29.  
  30. + runServer:(id)sockets target:(id)target action:(SEL)action fork:(BOOL)fFlag loop:(BOOL)lFlag;
  31.  
  32. - (int)acceptNewConnection:(MiscINETSocket **)newSocket timeout:(unsigned int)ms;
  33. - connectTo:(MiscINETAddress *)addr port:(int)portNum type:(int)aType;
  34. - connectTo:(MiscINETAddress *)addr service:(const char *)service type:(int)aType;
  35. - copyFromZone:(NXZone *)zone;
  36. - init;
  37. - openServerPort:(int *)portNum type:(int)aType;
  38. - openServerService:(const char *)service type:(int)aType;
  39.  
  40. - (int)receiveData:(void *)data length:(int *)dlen;
  41. - (int)receiveData:(void *)data length:(int *)dlen timeout:(unsigned int)ms from:(MiscINETAddress *)addr port:(int *)port;
  42. - (int)receiveData:(void *)data length:(int *)dlen timeout:(unsigned int)ms toNext:(unsigned char)sentinel;
  43. - sendData:(void *)data length:(int)dlen;
  44.  
  45. - shutdownLocalEnd;
  46. - shutdownRemoteEnd;
  47.  
  48. - enableDebug:(BOOL)aBool;
  49. - (BOOL)debugEnabled;
  50. - enableDelay:(BOOL)aBool;
  51. - (BOOL)delayEnabled;
  52. - enableKeepAlive:(BOOL)aBool;
  53. - (BOOL)keepAliveEnabled;
  54. - setLingerTime:(int)secs;
  55. - (int)lingerTime;
  56.  
  57. - (BOOL)dataAvailable;
  58. - (MiscINETAddress *)localAddress;
  59. - (int)localPortNum;
  60. - (MiscINETAddress *)remoteAddress;
  61. - (int)remotePortNum;
  62. - (int)socketError;
  63.  
  64. @end
  65.