Update uS, add AsyncSocket::getRemoteAddress()

This commit is contained in:
Alex Hultman
2019-03-03 07:40:44 +01:00
parent 35e6bad33b
commit 495ccfc076
5 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ private:
/* Init the HttpContext by registering libusockets event handlers */
HttpContext<SSL> *init() {
/* Handle socket connections */
us_new_socket_context_on_open(SSL, getSocketContext(), [](auto *s, int is_client) {
us_new_socket_context_on_open(SSL, getSocketContext(), [](auto *s, int is_client, char *ip, int ip_length) {
/* Any connected socket should timeout until it has a request */
us_new_socket_timeout(SSL, s, HTTP_IDLE_TIMEOUT_S);