diff --git a/src/App.h b/src/App.h index 685581b7f..360fa5fe6 100644 --- a/src/App.h +++ b/src/App.h @@ -571,7 +571,7 @@ struct TemplatedApp { } /* Register event handler for accepted FD. Can be used together with adoptSocket. */ - BuilderPatternReturnType &&preOpen(LIBUS_SOCKET_DESCRIPTOR (*handler)(LIBUS_SOCKET_DESCRIPTOR)) { + BuilderPatternReturnType &&preOpen(LIBUS_SOCKET_DESCRIPTOR (*handler)(struct us_socket_context_t *, LIBUS_SOCKET_DESCRIPTOR)) { httpContext->onPreOpen(handler); return std::move(static_cast(*this)); } diff --git a/src/HttpContext.h b/src/HttpContext.h index 838830244..a5db82b49 100644 --- a/src/HttpContext.h +++ b/src/HttpContext.h @@ -489,7 +489,7 @@ struct HttpContext { return us_socket_context_listen_unix(SSL, getSocketContext(), path, options, sizeof(HttpResponseData)); } - void onPreOpen(LIBUS_SOCKET_DESCRIPTOR (*handler)(LIBUS_SOCKET_DESCRIPTOR)) { + void onPreOpen(LIBUS_SOCKET_DESCRIPTOR (*handler)(struct us_socket_context_t *, LIBUS_SOCKET_DESCRIPTOR)) { us_socket_context_on_pre_open(SSL, getSocketContext(), handler); } diff --git a/src/LocalCluster.h b/src/LocalCluster.h index 81feffc91..f59a8d189 100644 --- a/src/LocalCluster.h +++ b/src/LocalCluster.h @@ -34,7 +34,7 @@ struct LocalCluster { cb(*app); - app->preOpen([](LIBUS_SOCKET_DESCRIPTOR fd) -> LIBUS_SOCKET_DESCRIPTOR { + app->preOpen([](struct us_socket_context_t *context, LIBUS_SOCKET_DESCRIPTOR fd) -> LIBUS_SOCKET_DESCRIPTOR { /* Distribute this socket in round robin fashion */ //std::cout << "About to load balance " << fd << " to " << roundRobin << std::endl; diff --git a/uSockets b/uSockets index 1764b9aef..89db1704d 160000 --- a/uSockets +++ b/uSockets @@ -1 +1 @@ -Subproject commit 1764b9aefade5381152796ca07ec41d8bbf70c36 +Subproject commit 89db1704ddb1ece2aa447f550c863ba5524e0e4d