Changeset 2898 for trunk/packages/vizservers/nanovis/socket/ServerSocket.h
- Timestamp:
- Mar 29, 2012, 11:38:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/socket/ServerSocket.h
r2827 r2898 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* 3 * ---------------------------------------------------------------------- 4 * Definition of the ServerSocket class 5 * 6 * ====================================================================== 2 /* ====================================================================== 7 3 * AUTHOR: Wei Qiao <qiaow@purdue.edu> 8 4 * Purdue Rendering and Perceptualization Lab (PURPL) … … 14 10 * ====================================================================== 15 11 */ 16 #ifndef S erverSocket_class17 #define S erverSocket_class12 #ifndef SERVERSOCKET_H 13 #define SERVERSOCKET_H 18 14 19 15 #include "Socket.h" … … 21 17 class ServerSocket : private Socket 22 18 { 23 private: 24 bool connected; 19 public: 20 ServerSocket(int port); 21 ServerSocket() 22 {} 23 virtual ~ServerSocket(); 25 24 26 public: 25 const ServerSocket& operator <<(const std::string&) const; 26 const ServerSocket& operator >>(std::string&) const; 27 27 28 ServerSocket ( int port ); 29 ServerSocket (){}; 30 virtual ~ServerSocket(); 28 bool send(char* s, int size) const; 29 int recv(char* s, int size) const; 31 30 32 const ServerSocket& operator << ( const std::string& ) const; 33 const ServerSocket& operator >> ( std::string& ) const; 31 bool accept(ServerSocket&); 34 32 35 bool send(char* s, int size) const; 36 int recv( char* s, int size) const; 33 void set_non_blocking(bool val); 34 bool is_connected(); 35 bool set_connected(bool val); 37 36 38 bool accept ( ServerSocket& ); 39 40 void set_non_blocking(bool val); 41 bool is_connected(); 42 bool set_connected(bool val); 37 private: 38 bool connected; 43 39 }; 44 40 45 46 41 #endif
Note: See TracChangeset
for help on using the changeset viewer.