3 This file is part of NetVis
4 Copyright @ 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed unter the GPL
8 #include <netinet/in.h>
10 #include <msp/strings/lexicalcast.h>
13 Port::Port(unsigned n, const Msp::GL::Color &c):
19 addr.sin_family = AF_INET;
20 addr.sin_port = ntohs(number);
21 addr.sin_addr.s_addr = 0;
22 int err = getnameinfo(reinterpret_cast<sockaddr *>(&addr), sizeof(sockaddr_in), 0, 0, buf, sizeof(buf), 0);
26 name = Msp::lexical_cast(number);