Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OCaml-ssl and input_string
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Berke Durak <berke.durak@g...>
Subject: Re: [Caml-list] OCaml-ssl and input_string

>From what I've inferred from ocaml-ssl's documentation, its "read" function
has Unix-like non-blocking

This means that read returns the number of bytes available, not the number
of bytes requested.

Hence you need an extra buffering/parsing layer on top of SSL sockets.
However you are using
IMAP, which is line-oriented, I guess Ssl.input_string should do what you