[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling 'select' from emacs_gnutls_pull
From: |
Ted Zlatanov |
Subject: |
Re: Calling 'select' from emacs_gnutls_pull |
Date: |
Sat, 16 Feb 2013 13:00:58 -0500 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
On Sat, 16 Feb 2013 18:52:23 +0200 Eli Zaretskii <address@hidden> wrote:
>> From: Ted Zlatanov <address@hidden>
>> Date: Sat, 16 Feb 2013 10:55:45 -0500
>> So I don't know if it would make sense to let the Emacs
>> reader thread handle the socket management, because we could end up with
>> poor performance or even contention.
EZ> We already use the Emacs reader threads for that. And it works well
EZ> enough for sockets. In a nutshell, the reader thread does blocking
EZ> reads from the socket, while 'sys_read' (called by Emacs as 'read')
EZ> emulates non-blocking reads, by looking at the status set by the
EZ> reader thread.
Nice. The simpler, the better!
>> if I can help simulate this condition or test some possible
>> solutions, I'll be glad to assist.
EZ> Thanks. It would be good if you (or someone else) could describe a
EZ> simple setup for reading stuff via GnuTLS from some URL, which I could
EZ> then try on my machine under a debugger.
Sure. It's actually quite simple to open a SSL connection to the HTTP/S
port (the SERVICE parameter is either a string or an integer):
#+begin_src lisp
(open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https")
#+end_src
If GnuTLS support is enabled, opening any SSL connection with the
`url-*' function should do it too... it's the default transport.
You can also call `gnutls-negotiate' directly, see `gnutls.el' for the
details.
Ted
- Calling 'select' from emacs_gnutls_pull, Eli Zaretskii, 2013/02/16
- Re: Calling 'select' from emacs_gnutls_pull, Ted Zlatanov, 2013/02/16
- Re: Calling 'select' from emacs_gnutls_pull, Eli Zaretskii, 2013/02/16
- Re: Calling 'select' from emacs_gnutls_pull,
Ted Zlatanov <=
- Re: Calling 'select' from emacs_gnutls_pull, Eli Zaretskii, 2013/02/16
- Re: Calling 'select' from emacs_gnutls_pull, Ted Zlatanov, 2013/02/17
- Re: Calling 'select' from emacs_gnutls_pull, Claudio Bley, 2013/02/22
- Re: Calling 'select' from emacs_gnutls_pull, Eli Zaretskii, 2013/02/22
- Re: Calling 'select' from emacs_gnutls_pull, Claudio Bley, 2013/02/22
- Re: Calling 'select' from emacs_gnutls_pull, Eli Zaretskii, 2013/02/22