guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IMAP SSL Connection using Guile


From: Ludovic Courtès
Subject: Re: IMAP SSL Connection using Guile
Date: Tue, 02 May 2017 13:58:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello!

Amirouche <address@hidden> skribis:

> I am trying to connect to an imap server using SSL but it fails. The
> program does
> indeed connect to the remote server, but when I try to read on the
> port it blocks
> until the connection is closed by the remote host.

[...]

> (define (connect-to-server host port)
>   (let ((addrinfo (car (getaddrinfo host (number->string port)))))
>     (let ((port (socket (addrinfo:fam addrinfo)
>                         SOCK_STREAM
>                         IPPROTO_IP)))
>       ;; Disable Nagle's algorithm.  We buffer ourselves.
>       (setsockopt port IPPROTO_TCP TCP_NODELAY 1)
>       (setvbuf port 'block 1024)
>       (connect port (addrinfo:addr addrinfo))
>       port)))

Did you try the exact same code on raw IMAP (without TLS)?

It maybe that the bufferring you’re asking for above is waiting for more
data than can be received at this point according to the IMAP protocol.

HTH,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]