MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / ToString

Method ToString

PanzerChasm/net/net.cpp:118–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118std::string InetAddress::ToString() const
119{
120 std::string result;
121 result.reserve( std::strlen( "255.255.255.255:65535") );
122
123 in_addr ip;
124#ifdef _WIN32
125 ip.S_un.S_addr= ::htonl( ip_address );
126#else
127 ip.s_addr= htonl( ip_address );
128#endif
129
130 result+= ::inet_ntoa( ip );
131 result+= ":" + std::to_string( port );
132
133 return result;
134}
135
136class NetConnection final : public IConnection
137{

Callers 1

ConnectToServerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected