unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Local interface used for outbound network connections
Date: 08 Jan 2003 17:39:18 +0100	[thread overview]
Message-ID: <5xbs2rh9zd.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <87u1gjzogj.fsf@lexx.delysid.org>

Mario Lang <mlang@delysid.org> writes:

> > I definitely intended make-network-process to make this info
> > available, but I forgot to implement it.  Thanks for reminding me :-)
> >
> Thanks a lot!  Tested, and works here.

Good.

> 
> (defun erc-dcc-get-host (proc)
>   (let ((sockaddr (plist-get (process-contact erc-process t) :local)))
>     (when sockaddr
>         (mapconcat #'number-to-string (subseq sockaddr 0 4) "."))))

I just installed a change to format-network-address, so you can now 
omit the port number from the result string.  

You may thus simplify your code like this (format-network-address
returns nil if the address is nil):

(defun erc-dcc-get-host (proc)
  (let ((sockaddr (plist-get (process-contact erc-process t) :local)))
     (format-network-address sockaddr t)))


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2003-01-08 16:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07 22:43 Local interface used for outbound network connections Mario Lang
2003-01-08 11:50 ` Kim F. Storm
2003-01-08 14:49   ` Mario Lang
2003-01-08 16:39     ` Kim F. Storm [this message]
2003-01-08 16:54       ` Kim F. Storm
2003-01-09  7:28 ` Richard Stallman
2003-01-09 15:27   ` Mario Lang

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=5xbs2rh9zd.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.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).