typedef u_short in_port_t;
#endif
- in_addr_t addr;
- in_port_t port;
+ in_addr_t addr;
+ in_port_t port;
public:
InetAddr();
InetAddr(const sockaddr_in &);
InetAddr(in_addr_t, in_port_t);
- Family get_family() const { return INET; }
- in_addr_t get_addr() const { return ntohl(addr); }
- in_port_t get_port() const { return ntohs(port); }
+ Family get_family() const { return INET; }
+ in_addr_t get_addr() const { return ntohl(addr); }
+ in_port_t get_port() const { return ntohs(port); }
std::string str() const;
virtual unsigned fill_sockaddr(sockaddr &) const;
virtual InetAddr *copy() const { return new InetAddr(*this); }
#ifdef WIN32
IO::Handle event;
#endif
- bool connected;
- SockAddr *local_addr;
- SockAddr *peer_addr;
+ bool connected;
+ SockAddr *local_addr;
+ SockAddr *peer_addr;
Socket(SocketHandle, const SockAddr &);
Socket(Family, int, int);