Add getNativeHandle functions
This commit is contained in:
@@ -38,6 +38,11 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
/* Returns the SSL_CTX of this app, or nullptr. */
|
||||
void *getNativeHandle() {
|
||||
return us_socket_context_get_native_handle(SSL, (struct us_socket_context_t *) httpContext);
|
||||
}
|
||||
|
||||
/* Attaches a "filter" function to track socket connections/disconnections */
|
||||
void filter(fu2::unique_function<void(HttpResponse<SSL> *, int)> &&filterHandler) {
|
||||
httpContext->filter(std::move(filterHandler));
|
||||
|
||||
@@ -35,6 +35,11 @@ struct AsyncSocket {
|
||||
friend struct TopicTree;
|
||||
|
||||
protected:
|
||||
/* Returns SSL pointer or FD as pointer */
|
||||
void *getNativeHandle() {
|
||||
return us_socket_get_native_handle(SSL, (us_socket_t *) this);
|
||||
}
|
||||
|
||||
/* Get loop data for socket */
|
||||
LoopData *getLoopData() {
|
||||
return (LoopData *) us_loop_ext(us_socket_context_loop(SSL, us_socket_context(SSL, (us_socket_t *) this)));
|
||||
|
||||
+1
-1
Submodule uSockets updated: fa16479609...b941014076
Reference in New Issue
Block a user