caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Vsevolod Fedorov" <sevaAtWork@mail.ru>
To: <caml-list@inria.fr>
Subject: Unix module API: nonblocking connect's errors retrieving
Date: Thu, 22 Sep 2005 17:51:25 +0400	[thread overview]
Message-ID: <00de01c5bf7c$b9113610$670aa8c0@seva> (raw)

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

Hello, Camlers!

I have the following problem when using Unix module:

I issuing 'connect' for nonblocked-mode socket.
This can raise EINPROGRESS error meaning connect is not yet complete.
Then (as I taught by manuals) I use 'select' method and then 'getsockopt_int sock SO_ERROR' to retreive connect results.
The problem is: 'getsockopt_int' returns 'int' while I need Unix.error type.
I can't map int to error in good way.

Of couse, I can use some workarounds (and I had to use one), but they all are not look good.

May be is it the time to extend Unix module API?
For example, add function like 'getsockopt_error' or 'int_to_error'?

Seva


[-- Attachment #2: Type: text/html, Size: 1604 bytes --]

             reply	other threads:[~2005-09-22 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22 13:51 Vsevolod Fedorov [this message]
2005-09-22 14:14 ` [Caml-list] " Markus Mottl
2005-09-27 16:02 ` Jerome Vouillon

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='00de01c5bf7c$b9113610$670aa8c0@seva' \
    --to=sevaatwork@mail.ru \
    --cc=caml-list@inria.fr \
    /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).