home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mlddc320.zip / netio.h < prev    next >
C/C++ Source or Header  |  1997-12-16  |  581b  |  32 lines

  1. /*  Copyright 1997 Artur Skawina <skawina@usa.net>
  2.  *  All Rights Reserved.
  3.  */
  4.         
  5.         
  6. #include <unistd.h>
  7. #include <stdio.h>
  8.  
  9.  
  10. #ifndef __NORETURN
  11. #define __NORETURN
  12. #endif
  13.  
  14. #ifndef __NORETURN2
  15. # if __GNUC__>2 || __GNUC__==2 && __GNUC_MINOR__>=7
  16. #  define __NORETURN2 __attribute__ ((noreturn))
  17. # else
  18. #  define __NORETURN2
  19. # endif
  20. #endif
  21.  
  22.  
  23. void __NORETURN fatalerr( const char *s ) __NORETURN2;
  24.  
  25. int Connect( const char *hostname, const int port );
  26.  
  27. inline extern void Disconnect( const int sock );
  28. inline extern void Disconnect( const int sock )
  29. {
  30.    close( sock );
  31. }
  32.