src/Socket.h
branchv_0
changeset 7 e6f005f3edfe
parent 5 e57e2a2798b2
child 18 e16fa75135ad
equal deleted inserted replaced
6:f0c51bc4d164 7:e6f005f3edfe
    27 #include <netinet/in.h>
    27 #include <netinet/in.h>
    28 
    28 
    29 namespace relpipe {
    29 namespace relpipe {
    30 namespace out {
    30 namespace out {
    31 namespace socket {
    31 namespace socket {
       
    32 
       
    33 namespace options {
       
    34 static const char OPTION_PROTOCOL[] = "protocol";
       
    35 static const char OPTION_ROLE[] = "role";
       
    36 static const char OPTION_MODE[] = "mode";
       
    37 static const char OPTION_HOST[] = "host";
       
    38 static const char OPTION_PORT[] = "port";
       
    39 static const char OPTION_PATH[] = "path";
       
    40 
       
    41 static const char PROTOCOL_TCP[] = "tcp";
       
    42 static const char PROTOCOL_UDP[] = "udp";
       
    43 static const char PROTOCOL_UDS[] = "uds";
       
    44 static const char PROTOCOL_SCTP[] = "sctp";
       
    45 
       
    46 static const char ROLE_CLIENT[] = "client";
       
    47 static const char ROLE_SERVER[] = "server";
       
    48 
       
    49 static const char MODE_STREAM[] = "stream";
       
    50 static const char MODE_DATAGRAM[] = "datagram";
       
    51 }
    32 
    52 
    33 class Socket {
    53 class Socket {
    34 public:
    54 public:
    35 	virtual ~Socket() = default;
    55 	virtual ~Socket() = default;
    36 	virtual void send(const std::string& message) = 0;
    56 	virtual void send(const std::string& message) = 0;