Hook up AsyncSocket with WebSocket
This commit is contained in:
@@ -28,6 +28,7 @@ namespace uWS {
|
||||
template <bool SSL>
|
||||
struct AsyncSocket : StaticDispatch<SSL> {
|
||||
template <bool> friend struct HttpContext;
|
||||
template <bool> friend struct WebSocketContext;
|
||||
protected:
|
||||
using SOCKET_TYPE = typename StaticDispatch<SSL>::SOCKET_TYPE;
|
||||
using StaticDispatch<SSL>::static_dispatch;
|
||||
@@ -40,8 +41,13 @@ protected:
|
||||
);
|
||||
}
|
||||
|
||||
// we need a type safe realType = getData<MiddleType>
|
||||
|
||||
/* Get socket extension */
|
||||
void *getExt() {
|
||||
|
||||
// we might have multiple inheritance so need to know the middle type
|
||||
|
||||
return static_dispatch(us_ssl_socket_ext, us_socket_ext)((SOCKET_TYPE *) this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user