Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

igtlClientSocket.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Open IGT Link Library
00004   Module:    $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlClientSocket.h $
00005   Language:  C++
00006   Date:      $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
00007   Version:   $Revision: 3460 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010 
00011   This software is distributed WITHOUT ANY WARRANTY; without even
00012   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013   PURPOSE.  See the above copyright notices for more information.
00014 
00015 =========================================================================*/
00016 /*=========================================================================
00017 
00018   Program:   Visualization Toolkit
00019   Module:    $RCSfile: vtkClientSocket.h,v $
00020 
00021   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00022   All rights reserved.
00023   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00024 
00025      This software is distributed WITHOUT ANY WARRANTY; without even
00026      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00027      PURPOSE.  See the above copyright notice for more information.
00028 
00029 =========================================================================*/
00030 // .NAME igtlClientSocket - Encapsulates a client socket.
00031 
00032 #ifndef __igtlClientSocket_h
00033 #define __igtlClientSocket_h
00034 
00035 #include "igtlSocket.h"
00036 #include "igtlWin32Header.h"
00037 
00038 namespace igtl
00039 {
00040 
00041 class ServerSocket;
00042 
00043 class IGTLCommon_EXPORT ClientSocket : public Socket
00044 {
00045 public:
00046   typedef ClientSocket              Self;
00047   typedef Socket                    Superclass;
00048   typedef SmartPointer<Self>        Pointer;
00049   typedef SmartPointer<const Self>  ConstPointer;
00050 
00051   igtlTypeMacro(igtl::ClientSocket, igtl::Socket)
00052   igtlNewMacro(igtl::ClientSocket);
00053 
00054   void PrintSelf(std::ostream& os);
00055 
00056   // Description:
00057   // Connects to host. Returns 0 on success, -1 on error.
00058   int ConnectToServer(const char* hostname, int port); 
00059   
00060 protected:
00061   ClientSocket();
00062   ~ClientSocket();
00063 
00064 //BTX
00065   friend class ServerSocket;
00066 //ETX
00067 private:
00068   ClientSocket(const ClientSocket&); // Not implemented.
00069   void operator=(const ClientSocket&); // Not implemented.
00070 };
00071 
00072 }
00073 
00074 #endif
00075 
00076 

Generated at Sat Apr 17 12:12:15 2010 for OpenIGTLink by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2000