Gnus development mailing list
 help / color / mirror / Atom feed
From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen)
Subject: Re: Connecting to a newsserver with nntp.
Date: 22 Feb 1996 19:03:29 +0100	[thread overview]
Message-ID: <w8sg2c3i6fi.fsf@aegir.ifi.uio.no> (raw)
In-Reply-To: pp@pfawww.pp.se's message of 22 Feb 1996 08:54:21 +0100

pp@pfawww.pp.se (Per Persson) writes:

> ffap.el which comes with 19.30 does this and has some variables for
> it, it's pretty much spread out so I guess you have to poke around in
> it a little yuorself. :-)

Hmn.  Here's the relevant code:

	(condition-case error
	    (progn
	      (delete-process
	       (open-network-stream
		"ffap-machine-p" nil host (or service "discard")))
	      t)
	  (error
	   (let ((mesg (car (cdr error))))
	     (cond
	      ;; v18:
	      ((string-match "^Unknown host" mesg) nil)
	      ((string-match "not responding$" mesg) mesg)
	      ((equal mesg "connection failed")
	       (if (equal (nth 2 error) "permission denied")
		   nil			; host does not exist
		 ;; Other errors mean host exists:
		 (nth 2 error)))
	      ;; Could be "Unknown service":
	      (t (signal (car error) (cdr error)))))))

So it doesn't really ping at all -- it just tries to connect to the
"discard" port on the machine.  If that fails, then it assumes the
machine is down.

Anyways, Gnus could do something similar.  

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


  reply	other threads:[~1996-02-22 18:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-21 18:02 Per Persson
1996-02-21 18:39 ` eichin
1996-02-21 19:51   ` Per Persson
1996-02-21 19:56     ` eichin
1996-02-21 20:19       ` Per Persson
1996-02-22  1:12         ` Lars Magne Ingebrigtsen
1996-02-22  7:54           ` Per Persson
1996-02-22 18:03             ` Lars Magne Ingebrigtsen [this message]
1996-02-21 22:29       ` Greg Stark
1996-02-22  6:01         ` Lars Magne Ingebrigtsen
1996-02-22 23:28           ` Wes Hardaker

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

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

  git send-email \
    --in-reply-to=w8sg2c3i6fi.fsf@aegir.ifi.uio.no \
    --to=larsi@ifi.uio.no \
    /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.
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 NNTP newsgroup(s).