[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 01317) Re: using getaddrinfo
On Sun, Mar 17, 2002 at 08:36:58PM +0200, Pekka Savola wrote:
> #define PORT "1234"
>
> and
> error = getaddrinfo(remote_host, PORT, &hints, &head);
>
> ?
Well, yes, I could do something like that. In my case I would do
something like snprintf to convert an in to a string, since the port is
specified at run time. If that's really the right way to do things,
then I'm OK with that, but it feels weird to me to pass an int as a
string when it's just going to be converted back to an int.
noah
--
Noah Meyerhans
Computer Resource Services, MIT Laboratory for Computer Science