Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

Socket.h

Go to the documentation of this file.
00001 /*
00002  * $Id: Socket.h,v 1.7 2002/07/13 05:00:10 mindstorm2600 Exp $
00003  */
00011 #ifndef ___SOCKET_H__
00012 #define ___SOCKET_H__
00013 #include<String.h>
00014 #include<SocketBase.h>
00015 #include<Exception.h>
00016 
00017 namespace clawsoft{ //Namespace starts
00018 
00022 class Socket:public SocketBase{
00023  protected:
00025   String host;
00031   int CreateSocket(const String thehost, int theport);
00032  public:
00034   Socket(){;}
00040   Socket(String const thehost, int theport);
00046   Socket(const char *thehost, int theport);
00053   Socket(int s, int pport);
00057   Socket(const Socket &s);
00058   Socket &operator=(Socket s){
00059           port = s.port;
00060           sock = s.sock;
00061   }
00065   ~Socket(){
00066   }
00070   void close(void);
00074   const int getPort(){
00075    return port;
00076   }
00080   Socket &operator<<(const char chr);
00084   Socket &operator<<(const int value);
00088   Socket &operator<<(const unsigned int value);
00092   Socket &operator<<(const float value);
00096   Socket &operator<<(const double value);
00100   Socket &operator<<(const long double value);
00104   Socket &operator<<(const long value);
00108   Socket &operator<<(const unsigned long value);
00112   Socket &operator<<(const unsigned long long value);
00116   Socket &operator<<(String str);
00123   void write(const void *buffer, unsigned long size);
00124 
00125 
00126 
00127 
00128 
00132   Socket &operator>>(char &chr);
00136   Socket &operator>>(int &value);
00140   Socket &operator>>(unsigned int &value);
00144   Socket &operator>>(float &value);
00148   Socket &operator>>(double &value);
00152   Socket &operator>>(long double &value);
00156   Socket &operator>>(long &value);
00160   Socket &operator>>(unsigned long &value);
00164   Socket &operator>>(unsigned long long &value);
00168   Socket &operator>>(String &str);
00175   void read(void *buffer, unsigned long size);
00176 
00177 
00178 };
00179 
00180 
00181 }; //End of namespace directive
00182 
00183 #endif

Powered by:

SourceForge Logo