home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 400_01 / socketpp-1.5 / test / tdunwrite.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-06  |  712 b   |  30 lines

  1. // tdunwrite.cc. Test for -*- C++ -*- socket library
  2. // Copyright (C) 1992,1993 Gnanasekaran Swaminathan <gs4t@virginia.edu>
  3. // 
  4. // Permission is granted to use at your own risk and distribute this software
  5. // in source and binary forms provided the above copyright
  6. // notice and this paragraph are preserved on all copies.
  7. // This software is provided "as is" with no express or implied warranty.
  8. //
  9. // Version: 07Nov93 1.5
  10.  
  11. #include <sockunix.h>
  12.  
  13. main(int ac, char** av)
  14. {
  15.     if (ac < 2) {
  16.         cerr << "USAGE: " << av[0] << " socket_path_name data...\n";
  17.         return 1;
  18.     }
  19.  
  20.     osockunix    su (sockbuf::sock_dgram);
  21.  
  22.     su->connect (av[1]);
  23.  
  24.     su << ac << ' ';
  25.     for (int i=0; av[i]; i++) su << av[i] << ' ';
  26.     su << endl;
  27.  
  28. }
  29.  
  30.