00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef RGMA_TCPSOCKET_H
00015 #define RGMA_TCPSOCKET_H
00016 #include "rgma/RGMAException.h"
00017 #include "rgma/RemoteException.h"
00018 #include "rgma/Socket.h"
00019 #include "log4cxx/logger.h"
00020 #include "log4cxx/level.h"
00021 #include "log4cxx/helpers/loglog.h"
00022 #include "log4cxx/propertyconfigurator.h"
00023 #include "log4cxx/helpers/exception.h"
00024 #include <arpa/inet.h>
00025
00026
00027
00028
00029
00030 #include <string>
00031
00032 namespace glite
00033 {
00034 namespace rgma
00035 {
00040 class TCPSocket:public Socket
00041 {
00042 private:
00043
00044 log4cxx::LoggerPtr m_logger;
00045 struct sockaddr_in m_addr;
00046
00047 protected:
00048 int m_sock;
00049 public:
00050 virtual ~TCPSocket();
00051 TCPSocket();
00052 virtual void connect(std::string host, int port) throw(RGMAException, RemoteException);
00053 virtual void write(std::string request, std::string& resonse) throw(RGMAException, RemoteException);
00054 virtual void close()throw(RGMAException, RemoteException);
00055 };
00056 }
00057 }
00058 #endif