qa_fuse.cpp

00001 
00002 /***************************************************************************
00003  *  qa_fuse.h - QA for FUSE
00004  *
00005  *  Created: Wed Nov 14 17:13:14 2007
00006  *  Copyright  2005-2007  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 /// @cond QA
00025 
00026 #include <fvutils/net/fuse_server.h>
00027 #include <fvutils/net/fuse_client.h>
00028 // include <fvutils/net/fuse_message.h>
00029 
00030 //#include <cstdlib>
00031 #include <cstdio>
00032 #include <unistd.h>
00033 
00034 using namespace firevision;
00035 
00036 int
00037 main(int argc, char **argv)
00038 {
00039 
00040   FuseServer *fs = new FuseServer(5000);
00041   FuseClient *fc = new FuseClient("127.0.0.1", 5000, NULL);
00042 
00043   fc->connect();
00044   fc->start();
00045 
00046   usleep(5000);
00047 
00048   printf("Cancel and join\n");
00049   fc->cancel();
00050   fc->join();
00051 
00052   printf("Delete\n");
00053   delete fc;
00054   delete fs;
00055 
00056   return 0;
00057 }
00058 
00059 
00060 
00061 /// @endcond

Generated on Tue Feb 22 13:32:16 2011 for Fawkes API by  doxygen 1.4.7