MLton.Socket.Host.getByName???

Stephen Weeks MLton@sourcelight.com
Fri, 26 Jan 2001 15:16:07 -0800 (PST)


All of the socket stuff was a very quick hack just so I could get some simple
tools (a web mirror and web proxy program) up and running.  I put in just enough 
so I could do what I need.  Although I think it's a much simpler interface than
that provided by (what I expect to see from) the basis library.

> What is MLton.Socket.Host.getByName supposed to do?  When I look up a machine
> by name, I want an address back, but it seems to be some hack to return the
> full name.  How do I convert a machine name to an address?  I.e., given a
> machine name and a port number, how can I connect to the machine/port?

> Ah, I see that connect takes a string.

Right.  Connect has gethostbyname built in.  There isn't currently a way to
convert a machine name to an address.

> I can't see any use for getByName as
> is, and I would really like to save the address away.

Agreed.  The idea was that Host.t would be a record corresponding to struct
hostent.  But I only put in what I needed so far.  It should certainly have an
address and other stuff.  If you want to you can add it, or ask me and I will.
The former is preferable :-).