unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 34617@debbugs.gnu.org
Subject: bug#34617: 27.0.50; Can't bind a server process to all interfaces?
Date: Fri, 22 Feb 2019 15:00:17 +0100	[thread overview]
Message-ID: <m2wolrrki6.fsf@gmail.com> (raw)
In-Reply-To: <m3d0nk546j.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 22 Feb 2019 14:43:48 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I'm looking to bind a server process to all interfaces on the machine.
> If I say:
>
> 		(make-network-process
> 		 :name name
> 		 :family 'ipv4
> 		 :service port
> 		 :host (system-name)
> 		 :server t))
>
> then the process won't be listening to the localhost address, and if I
> say :host nil, it'll only be listening to the localhost address.
>
> Am I missing something, or does Emacs just not have a way to listen to
> INADDR_ANY?
>

Does :host "0.0.0.0" not work? Seems ok to me:

(setq proc (make-network-process
                 :name "foo"
                 :family 'ipv4
                 :service 6666
                 :host "0.0.0.0"
                 :server t))
                         
M-x list-processes

foo             --      listen  --                        --           Main         (network server on 0.0.0.0)
foo <127.0.0... --      open    foo <127.0.0.1:63650>     --           Main         (network connection to 127.0.0.1)
foo <172.26.... --      open    foo <172.26.128.66:63605> --           Main         (network connection to 172.26.128.66)
foo <172.26.... --      open    foo <172.26.148.3:63628>  --           Main         (network connection to 172.26.148.3)



Robert





      parent reply	other threads:[~2019-02-22 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 13:43 bug#34617: 27.0.50; Can't bind a server process to all interfaces? Lars Ingebrigtsen
2019-02-22 13:51 ` Lars Ingebrigtsen
2019-02-22 14:05   ` Lars Ingebrigtsen
2019-02-22 14:25     ` Robert Pluim
2019-02-22 14:28       ` Lars Ingebrigtsen
2019-02-22 15:39         ` Robert Pluim
2019-09-21  8:00       ` Lars Ingebrigtsen
2019-02-22 14:00 ` Robert Pluim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wolrrki6.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=34617@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).