From: Joel Reymont <joelr1@gmail.com>
To: Gerd Stolpmann <gerd@gerd-stolpmann.de>
Cc: OCaml List <caml-list@inria.fr>
Subject: ocamlnet changes needed for Mac OSX
Date: Sun, 6 May 2007 00:53:20 +0100 [thread overview]
Message-ID: <30022EF0-80B2-40D0-A9E0-A010ED581372@gmail.com> (raw)
Gerd,
I would like to suggest two changes that would enable ocamlnet to
work on Mac OSX:
1) src/rpc/rpc_transport.ml
let stream_rpc_multiplex_controller ?(close_inactive_descr=true) fd
esys =
let sockname = try
`Sockaddr(Unix.getsockname fd)
with Unix.Unix_error _ ->
`Implied in
let peername = try
`Sockaddr(Unix.getpeername fd)
with Unix.Unix_error _ ->
`Implied in
...
I see `Implied used in other places so this looks sensible to me.
2) src/equeue/uq_engines.ml
class socket_multiplex_controller
?(close_inactive_descr = true)
?(supports_half_open_connection = false)
fd esys : datagram_multiplex_controller =
let fd_style =
try
let addr = Unix.getpeername fd in
(* fd is a connected socket *)
`Recv_send addr
with
| Unix.Unix_error(Unix.ENOTCONN,_,_) ->
(* fd is an unconnected socket *)
`Recvfrom_sendto
| Unix.Unix_error(Unix.ENOTSOCK,_,_) ->
(* fd is not a socket *)
`Read_write
| _ ->
`Recvfrom_sendto
in
...
A default case in the match above to handle the rest of getpeername
errors.
Please let me know if this is acceptable.
Thanks, Joel
--
http://wagerlabs.com/
reply other threads:[~2007-05-05 23:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=30022EF0-80B2-40D0-A9E0-A010ED581372@gmail.com \
--to=joelr1@gmail.com \
--cc=caml-list@inria.fr \
--cc=gerd@gerd-stolpmann.de \
/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