00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00024 #ifndef SCALESTACK_NETWORK_LOCAL_STREAM_CONNECTION_H
00025 #define SCALESTACK_NETWORK_LOCAL_STREAM_CONNECTION_H
00026
00027 #include <netdb.h>
00028 #include <string>
00029 #include <sys/socket.h>
00030 #include <sys/types.h>
00031 #include <sys/un.h>
00032
00033 #include <scalestack/kernel/macros.h>
00034 #include <scalestack/network/stream.h>
00035
00036 namespace scalestack
00037 {
00038 namespace network
00039 {
00040 namespace local
00041 {
00042 namespace stream
00043 {
00044
00045 class SCALESTACK_API connection: public network::stream_provider
00046 {
00047 public:
00048
00049 connection(event::handler_service& handler_service,
00050 stream_service& stream_service,
00051 int file_descriptor);
00052
00053 connection(event::handler_service& handler_service,
00054 stream_service& stream_service,
00055 const std::string& socket);
00056
00057 private:
00058
00062 SCALESTACK_LOCAL
00063 connection(const connection&);
00064
00068 SCALESTACK_LOCAL
00069 connection& operator=(const connection&);
00070
00071 struct addrinfo _socket_addrinfo;
00072 struct sockaddr_un _socket_sockaddr;
00073 };
00074
00075 }
00076 }
00077 }
00078 }
00079
00080 #endif