...
This commit is contained in:
@@ -50,14 +50,21 @@ public:
|
||||
PROTO_ID_SERLOCAL,
|
||||
PROTO_ID_TCP,
|
||||
PROTO_ID_TLS,
|
||||
PROTO_ID_UDP,
|
||||
PROTO_ID_WS,
|
||||
PROTO_ID_WSS,
|
||||
PROTO_ID_UNKNOWN
|
||||
};
|
||||
|
||||
static constexpr std::string_view protoMarkLocal{"local"}; // UNIX domain
|
||||
static constexpr std::string_view protoMarkTCP{"tcp"}; // TCP
|
||||
static constexpr std::string_view protoMarkTLS{"tls"}; // TLS
|
||||
static constexpr std::string_view protoMarkUDP{"udp"}; // UDP
|
||||
static constexpr std::string_view protoMarkWS{"ws"}; // Websocket
|
||||
static constexpr std::string_view protoMarkWSS{"wss"}; // Secure Websocket
|
||||
|
||||
static constexpr std::array validProtoMarks{protoMarkLocal, protoMarkTCP, protoMarkTLS};
|
||||
static constexpr std::array validProtoMarks{protoMarkLocal, protoMarkTCP, protoMarkTLS,
|
||||
protoMarkUDP, protoMarkWS, protoMarkWSS};
|
||||
|
||||
|
||||
static constexpr std::string_view localProtoTypeStream{"stream"}; // UNIX domain stream
|
||||
@@ -325,6 +332,21 @@ public:
|
||||
return proto() == protoMarkTLS;
|
||||
}
|
||||
|
||||
bool isUDP() const
|
||||
{
|
||||
return proto() == protoMarkUDP;
|
||||
}
|
||||
|
||||
|
||||
bool isWS() const
|
||||
{
|
||||
return proto() == protoMarkWS;
|
||||
}
|
||||
|
||||
bool isWSS() const
|
||||
{
|
||||
return proto() == protoMarkWSS;
|
||||
}
|
||||
|
||||
// add '\0' char (or replace special-meaning char/char-sequence) to construct UNIX abstract namespace
|
||||
// endpoint path
|
||||
|
||||
Reference in New Issue
Block a user