Commit 8b0a89ca authored by Tamaki Nishino's avatar Tamaki Nishino Committed by Alex Hultman

Make members accessible in derived class (#758)

parent 63581f69
......@@ -15,7 +15,7 @@ enum Options : unsigned int {
template <bool isServer>
class ExtensionsNegotiator {
private:
protected:
int options;
public:
ExtensionsNegotiator(int wantedOptions);
......
......@@ -16,7 +16,7 @@ enum ListenOptions {
struct Hub;
template <bool isServer>
struct WIN32_EXPORT Group : private uS::NodeData {
struct WIN32_EXPORT Group : protected uS::NodeData {
protected:
friend struct Hub;
friend struct WebSocket<isServer>;
......
......@@ -126,7 +126,7 @@ struct WIN32_EXPORT HttpSocket : uS::Socket {
size_t extensionsLength, const char *subprotocol,
size_t subprotocolLength, bool *perMessageDeflate);
private:
protected:
friend struct uS::Socket;
friend struct HttpResponse;
friend struct Hub;
......
......@@ -10,7 +10,7 @@
namespace uWS {
struct WIN32_EXPORT Hub : private uS::Node, public Group<SERVER>, public Group<CLIENT> {
struct WIN32_EXPORT Hub : protected uS::Node, public Group<SERVER>, public Group<CLIENT> {
protected:
struct ConnectionData {
std::string path;
......
......@@ -157,7 +157,7 @@ struct Context {
namespace TLS {
class WIN32_EXPORT Context {
private:
protected:
SSL_CTX *context = nullptr;
std::shared_ptr<std::string> password;
......
......@@ -13,7 +13,7 @@ enum ListenOptions : int {
};
class WIN32_EXPORT Node {
private:
protected:
template <void C(Socket *p, bool error)>
static void connect_cb(Poll *p, int status, int events) {
C((Socket *) p, status < 0);
......@@ -71,7 +71,6 @@ private:
} while ((clientFd = netContext->acceptSocket(serverFd)) != INVALID_SOCKET);
}
protected:
Loop *loop;
NodeData *nodeData;
std::recursive_mutex asyncMutex;
......
......@@ -62,7 +62,7 @@ public:
static const unsigned int MEDIUM_MESSAGE_HEADER = isServer ? 8 : 4;
static const unsigned int LONG_MESSAGE_HEADER = isServer ? 14 : 10;
private:
protected:
static inline bool isFin(char *frame) {return *((unsigned char *) frame) & 128;}
static inline unsigned char getOpCode(char *frame) {return *((unsigned char *) frame) & 15;}
static inline unsigned char payloadLength(char *frame) {return ((unsigned char *) frame)[1] & 127;}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment