diff options
author | Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 2021-03-18 08:32:15 +0100 |
---|---|---|
committer | Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 2021-03-18 08:40:35 +0100 |
commit | e4a954734d005746f9c7976d39ec6bfcf8f5ca75 (patch) | |
tree | c420ce4daa73b47e803cf713fcb060b85b253e6d /web | |
parent | a1ecd392a1f0d614f0c994129afd93fe924020ef (diff) |
Use inet-pton instead of inet-aton.
* web/socket/server.scm (make-server-socket): Add #:family parameter
and use it for inet-pton.
Diffstat (limited to 'web')
-rw-r--r-- | web/socket/server.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/socket/server.scm b/web/socket/server.scm index cd52220..2d1694d 100644 --- a/web/socket/server.scm +++ b/web/socket/server.scm @@ -1,5 +1,6 @@ ;;; guile-websocket --- WebSocket client/server ;;; Copyright © 2015 David Thompson <davet@gnu.org> +;;; Copyright © 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of guile-websocket. ;;; @@ -55,7 +56,8 @@ string." (define* (make-server-socket #:key (host #f) - (addr (if host (inet-aton host) INADDR_LOOPBACK)) + (family AF_INET) + (addr (if host (inet-pton family host) INADDR_LOOPBACK)) (port 8080)) (let ((sock (socket PF_INET SOCK_STREAM 0))) (setsockopt sock SOL_SOCKET SO_REUSEADDR 1) |