MCPcopy Create free account
hub / github.com/ddnet/ddnet / ServerBrowserFormatAddresses

Function ServerBrowserFormatAddresses

src/engine/client/serverbrowser.cpp:706–723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706static void ServerBrowserFormatAddresses(char *pBuffer, int BufferSize, NETADDR *pAddrs, int NumAddrs)
707{
708 pBuffer[0] = '\0';
709 for(int i = 0; i < NumAddrs; i++)
710 {
711 if(i != 0)
712 {
713 str_append(pBuffer, ",", BufferSize);
714 }
715 if(pAddrs[i].type & NETTYPE_TW7)
716 {
717 str_append(pBuffer, "tw-0.7+udp://", BufferSize);
718 }
719 char aIpAddr[NETADDR_MAXSTRSIZE];
720 net_addr_str(&pAddrs[i], aIpAddr, sizeof(aIpAddr), true);
721 str_append(pBuffer, aIpAddr, BufferSize);
722 }
723}
724
725void CServerBrowser::SetInfo(CServerEntry *pEntry, const CServerInfo &Info) const
726{

Callers 3

SetInfoMethod · 0.85
AddMethod · 0.85
ReplaceEntryMethod · 0.85

Calls 2

net_addr_strFunction · 0.85
str_appendFunction · 0.50

Tested by

no test coverage detected