caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Unix module API: nonblocking connect's errors retrieving
@ 2005-09-22 13:51 Vsevolod Fedorov
  2005-09-22 14:14 ` [Caml-list] " Markus Mottl
  2005-09-27 16:02 ` Jerome Vouillon
  0 siblings, 2 replies; 3+ messages in thread
From: Vsevolod Fedorov @ 2005-09-22 13:51 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-27 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-22 13:51 Unix module API: nonblocking connect's errors retrieving Vsevolod Fedorov
2005-09-22 14:14 ` [Caml-list] " Markus Mottl
2005-09-27 16:02 ` Jerome Vouillon

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).