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

Re: ocaml-dns- resolver and client

Thanks Mort, this really plugs the last big 'gap' in the network stack! I've 
your code with this minor change:

 let lookup_addr s = 
-  lwt ans = s |> string_to_ipv4 |> Dns_resolver.gethostbyaddr in
+  lwt ans = wrap1 string_to_ipv4 s >>= Dns_resolver.gethostbyaddr in

Since the string_to_ipv4 function can return an OCaml exception, the Lwt.wrap1
function will convert that to the Lwt monad (and then the standard >>= bind
operator will pass that through to the resolver if an error wasn't raised).

I'll take a shot at the conversion to a priority-queue-based timer later on
this week, but have to do slides and finish up the ocaml-workflow module 
(which has working shared memory communication and a rough FABLE-like interface 


On 19 Mar 2012, at 23:08, Richard Mortier wrote:

> pull reqs sent- cover both ocaml-dns and ocaml-uri (latter adds a crappy 
> string_to_ipv4 function to make the odig test client support reverse lookup).
> obviously many improvements possible but i think it just about does the 
> basics.
> -- 
> Cheers,
> R.
> This message and any attachment are intended solely for the addressee and may 
> contain confidential information. If you have received this message in error, 
> please send it back to me, and immediately delete it.   Please do not use, 
> copy or disclose the information contained in this message or in any 
> attachment.  Any views or opinions expressed by the author of this email do 
> not necessarily reflect the views of the University of Nottingham.
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.