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 int
00035 main(int argc, char **argv)
00036 {
00037
00038   FuseServer *fs = new FuseServer(5000);
00039   FuseClient *fc = new FuseClient("127.0.0.1", 5000, NULL);
00040
00041   fc->connect();
00042   fc->start();
00043
00044   usleep(5000);
00045
00046   printf("Cancel and join\n");
00047   fc->cancel();
00048   fc->join();
00049
00050   printf("Delete\n");
00051   delete fc;
00052   delete fs;
00053
00054   return 0;
00055 }
00056
00057
00058 
00059 /// @endcond