Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Samples/ChatExample/Client/Chat Example Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "mafianet/Gets.h"
#include "mafianet/linux_adapter.h"
#include "mafianet/osx_adapter.h"
#include "mafianet/guid_util.h"

#if LIBCAT_SECURITY==1
#include "mafianet/SecureHandshake.h" // Include header for secure handshake
Expand Down Expand Up @@ -144,7 +145,7 @@ int main(void)
printf("%i. %s\n", i+1, client->GetLocalIP(i));
}

printf("My GUID is %s\n", client->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("My GUID is %s\n", MafiaNet::to_string(client->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str());
puts("'quit' to quit. 'stat' to show stats. 'ping' to ping.\n'disconnect' to disconnect. 'connect' to reconnnect. Type to talk.");

char message[2048];
Expand Down Expand Up @@ -325,7 +326,7 @@ int main(void)

case ID_CONNECTION_REQUEST_ACCEPTED:
// This tells the client they have connected
printf("ID_CONNECTION_REQUEST_ACCEPTED to %s with GUID %s\n", p->systemAddress.ToString(true), p->guid.ToString());
printf("ID_CONNECTION_REQUEST_ACCEPTED to %s with GUID %s\n", p->systemAddress.ToString(true), MafiaNet::to_string(p->guid).c_str());
printf("My external address is %s\n", client->GetExternalID(p->systemAddress).ToString(true));
break;
case ID_CONNECTED_PING:
Expand Down
5 changes: 3 additions & 2 deletions Samples/ChatExample/Server/Chat Example Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "mafianet/Gets.h"
#include "mafianet/linux_adapter.h"
#include "mafianet/osx_adapter.h"
#include "mafianet/guid_util.h"

#if LIBCAT_SECURITY==1
#include "mafianet/SecureHandshake.h" // Include header for secure handshake
Expand Down Expand Up @@ -146,7 +147,7 @@ int main(void)
printf("%i. %s (LAN=%i)\n", i+1, sa.ToString(false), sa.IsLANAddress());
}

printf("\nMy GUID is %s\n", server->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("\nMy GUID is %s\n", MafiaNet::to_string(server->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str());
puts("'quit' to quit. 'stat' to show stats. 'ping' to ping.\n'pingip' to ping an ip address\n'ban' to ban an IP from connecting.\n'kick to kick the first connected player.\nType to talk.");
char message[2048];

Expand Down Expand Up @@ -273,7 +274,7 @@ int main(void)

case ID_NEW_INCOMING_CONNECTION:
// Somebody connected. We have their IP now
printf("ID_NEW_INCOMING_CONNECTION from %s with GUID %s\n", p->systemAddress.ToString(true), p->guid.ToString());
printf("ID_NEW_INCOMING_CONNECTION from %s with GUID %s\n", p->systemAddress.ToString(true), MafiaNet::to_string(p->guid).c_str());
clientID=p->systemAddress; // Record the player ID of the client

printf("Remote internal IDs:\n");
Expand Down
19 changes: 10 additions & 9 deletions Samples/ComprehensivePCGame/ComprehensivePCGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "mafianet/linux_adapter.h"
#include "mafianet/osx_adapter.h"
#include "mafianet/LinuxStrings.h"
#include "mafianet/guid_util.h"
// See http://www.digip.org/jansson/doc/2.4/
// This is used to make it easier to parse the JSON returned from the master server
#include "jansson.h"
Expand Down Expand Up @@ -754,7 +755,7 @@ RPC4GlobalRegistration __InGameChat("InGameChat", InGameChat, nullptr, 0);
// Write roomName and a list of NATTypeDetectionResult to a bitStream
void SerializeToJSON(RakString &outputString, RakString &roomName, DataStructures::List<NATTypeDetectionResult> &natTypes)
{
outputString.Set("'roomName': '%s', 'guid': '%s', 'natTypes' : [ ", roomName.C_String(), rakPeer->GetMyGUID().ToString());
outputString.Set("'roomName': '%s', 'guid': '%s', 'natTypes' : [ ", roomName.C_String(), MafiaNet::to_string(rakPeer->GetMyGUID()).c_str());
for (unsigned short i=0; i < natTypes.Size(); i++)
{
if (i!=0)
Expand Down Expand Up @@ -1060,7 +1061,7 @@ int main(void)
// Setup my own user
User *user = new User;
user->SetNetworkIDManager(networkIDManager);
user->userName = rakPeer->GetMyGUID().ToString();
user->userName = MafiaNet::to_string(rakPeer->GetMyGUID()).c_str();
// Inform TeamManager of my user's team member info
teamManager->GetWorldAtIndex(0)->ReferenceTeamMember(&user->tmTeamMember,user->GetNetworkID());

Expand All @@ -1073,7 +1074,7 @@ int main(void)
SLNET_VERIFY(rakPeer->Startup(8, &sd, 1) == RAKNET_STARTED);
rakPeer->SetMaximumIncomingConnections(8);
rakPeer->SetTimeoutTime(30000, MafiaNet::UNASSIGNED_SYSTEM_ADDRESS);
printf("Our guid is %s\n", rakPeer->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("Our guid is %s\n", MafiaNet::to_string(rakPeer->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str());
printf("Started on %s\n", rakPeer->GetMyBoundAddress().ToString(true));

// Start TCPInterface and begin connecting to the NAT punchthrough server
Expand All @@ -1095,12 +1096,12 @@ int main(void)
{
case ID_NEW_INCOMING_CONNECTION:
{
printf("ID_NEW_INCOMING_CONNECTION from %s. guid=%s.\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_NEW_INCOMING_CONNECTION from %s. guid=%s.\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
}
break;
case ID_CONNECTION_REQUEST_ACCEPTED:
{
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s,guid=%s\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s,guid=%s\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());

if (game->phase==Game::CONNECTING_TO_SERVER)
{
Expand Down Expand Up @@ -1204,9 +1205,9 @@ int main(void)
else
{
if (oldHost!=UNASSIGNED_RAKNET_GUID)
printf("ID_FCM2_NEW_HOST: A new system %s has become host, GUID=%s\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_FCM2_NEW_HOST: A new system %s has become host, GUID=%s\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
else
printf("ID_FCM2_NEW_HOST: System %s is host, GUID=%s\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_FCM2_NEW_HOST: System %s is host, GUID=%s\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
}

if (oldHost==UNASSIGNED_RAKNET_GUID)
Expand Down Expand Up @@ -1266,7 +1267,7 @@ int main(void)
{
// As with connection failed, this does not automatically mean we cannot join the session
// We only fail on ID_FCM2_VERIFIED_JOIN_FAILED
printf("NAT punch to %s failed. Reason %s\n", packet->guid.ToString(), PacketLogger::BaseIDTOString(packet->data[0]));
printf("NAT punch to %s failed. Reason %s\n", MafiaNet::to_string(packet->guid).c_str(), PacketLogger::BaseIDTOString(packet->data[0]));

if (game->phase==Game::NAT_PUNCH_TO_GAME_HOST)
game->EnterPhase(Game::SEARCH_FOR_GAMES);
Expand Down Expand Up @@ -1396,7 +1397,7 @@ int main(void)
if (thisSystemAccepted)
printf("Game join request accepted\n");
else
printf("System %s joined the mesh\n", systemsAccepted[0].ToString());
printf("System %s joined the mesh\n", MafiaNet::to_string(systemsAccepted[0]).c_str());

// Add the new participant to the game if we already know who the host is. Otherwise do this
// once ID_FCM2_NEW_HOST arrives
Expand Down
11 changes: 6 additions & 5 deletions Samples/FCMHost/FCM2HostTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "mafianet/Kbhit.h"
#include "mafianet/PacketLogger.h"
#include "mafianet/BitStream.h"
#include "mafianet/guid_util.h"

using namespace MafiaNet;

Expand All @@ -49,7 +50,7 @@ int main()
SLNET_VERIFY(rakPeer->Startup(8, &sd, 1) == RAKNET_STARTED);
rakPeer->SetMaximumIncomingConnections(8);
rakPeer->SetTimeoutTime(1000, MafiaNet::UNASSIGNED_SYSTEM_ADDRESS);
printf("Our guid is %s\n", rakPeer->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("Our guid is %s\n", MafiaNet::to_string(rakPeer->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str());
printf("Started on %s\n", rakPeer->GetMyBoundAddress().ToString(true));
// BitStream contextBs;
// contextBs.Write(RakString("Our guid is %s\n", rakPeer->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString()));
Expand All @@ -76,12 +77,12 @@ int main()

case ID_NEW_INCOMING_CONNECTION:
// Somebody connected. We have their IP now
printf("ID_NEW_INCOMING_CONNECTION from %s. guid=%s.\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_NEW_INCOMING_CONNECTION from %s. guid=%s.\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
break;

case ID_CONNECTION_REQUEST_ACCEPTED:
// Somebody connected. We have their IP now
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s. guid=%s.\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s. guid=%s.\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
break;


Expand All @@ -101,14 +102,14 @@ int main()
if (packet->guid==rakPeer->GetMyGUID())
printf("Got new host (ourselves)");
else
printf("Got new host %s, GUID=%s", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("Got new host %s, GUID=%s", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
MafiaNet::BitStream bs(packet->data,packet->length,false);
bs.IgnoreBytes(1);
RakNetGUID oldHost;
bs.Read(oldHost);
// If oldHost is different then the current host, then we lost connection to the host
if (oldHost!=UNASSIGNED_RAKNET_GUID)
printf(". Oldhost Guid=%s\n", oldHost.ToString());
printf(". Oldhost Guid=%s\n", MafiaNet::to_string(oldHost).c_str());
else
printf(". (First reported host)\n");
}
Expand Down
13 changes: 7 additions & 6 deletions Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "mafianet/Kbhit.h"
#include "mafianet/PacketLogger.h"
#include "mafianet/Gets.h"
#include "mafianet/guid_util.h"

using namespace MafiaNet;

Expand All @@ -51,7 +52,7 @@ int main()
SLNET_VERIFY(rakPeer[i]->Startup(NUM_PEERS, &sd, 1) == RAKNET_STARTED);
rakPeer[i]->SetMaximumIncomingConnections(NUM_PEERS);
rakPeer[i]->SetTimeoutTime(1000, MafiaNet::UNASSIGNED_SYSTEM_ADDRESS);
printf("Our guid is %s\n", rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("Our guid is %s\n", MafiaNet::to_string(rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str());
}

for (unsigned short i=0; i < NUM_PEERS; i++)
Expand Down Expand Up @@ -85,12 +86,12 @@ int main()

case ID_NEW_INCOMING_CONNECTION:
// Somebody connected. We have their IP now
printf("%i. ID_NEW_INCOMING_CONNECTION from %s. guid=%s.\n", i, packet->systemAddress.ToString(true), packet->guid.ToString());
printf("%i. ID_NEW_INCOMING_CONNECTION from %s. guid=%s.\n", i, packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
break;

case ID_CONNECTION_REQUEST_ACCEPTED:
// Somebody connected. We have their IP now
printf("%i. ID_CONNECTION_REQUEST_ACCEPTED from %s. guid=%s.\n", i, packet->systemAddress.ToString(true), packet->guid.ToString());
printf("%i. ID_CONNECTION_REQUEST_ACCEPTED from %s. guid=%s.\n", i, packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
break;


Expand All @@ -105,7 +106,7 @@ int main()
if (packet->systemAddress== MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("%i. Got new host (ourselves)\n", i);
else
printf("%i. Got new host %s, %s\n", i, packet->systemAddress.ToString(true), packet->guid.ToString());
printf("%i. Got new host %s, %s\n", i, packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
break;
}
}
Expand All @@ -129,9 +130,9 @@ int main()
hostGuid=fcm2[i].GetHostSystem();

if (weAreHost)
printf("%i. %iP myGuid=%s, hostGuid=%s tcc=%i (Y)\n",i, participantList, rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(), hostGuid.ToString(), fcm2[i].GetTotalConnectionCount());
printf("%i. %iP myGuid=%s, hostGuid=%s tcc=%i (Y)\n",i, participantList, MafiaNet::to_string(rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str(), MafiaNet::to_string(hostGuid).c_str(), fcm2[i].GetTotalConnectionCount());
else
printf("%i. %iP myGuid=%s, hostGuid=%s tcc=%i (N)\n",i, participantList, rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(), hostGuid.ToString(), fcm2[i].GetTotalConnectionCount());
printf("%i. %iP myGuid=%s, hostGuid=%s tcc=%i (N)\n",i, participantList, MafiaNet::to_string(rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str(), MafiaNet::to_string(hostGuid).c_str(), fcm2[i].GetTotalConnectionCount());
}
}
if (ch=='d' || ch=='D')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "mafianet/PacketLogger.h"
#include "mafianet/Gets.h"
#include "mafianet/BitStream.h"
#include "mafianet/guid_util.h"

using namespace MafiaNet;

Expand All @@ -38,7 +39,7 @@ MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS];
class FullyConnectedMesh2_UserData : public FullyConnectedMesh2
{
virtual void WriteVJCUserData(MafiaNet::BitStream *bsOut) {bsOut->Write(RakString("WriteVJCUserData test"));}
virtual void WriteVJSUserData(MafiaNet::BitStream *bsOut, RakNetGUID userGuid) {bsOut->Write(RakString("WriteVJSUserData test, userGuid=%s", userGuid.ToString()));}
virtual void WriteVJSUserData(MafiaNet::BitStream *bsOut, RakNetGUID userGuid) {bsOut->Write(RakString("WriteVJSUserData test, userGuid=%s", MafiaNet::to_string(userGuid).c_str()));}
};

int main()
Expand All @@ -56,7 +57,7 @@ int main()
SLNET_VERIFY(rakPeer[i]->Startup(NUM_PEERS, &sd, 1) == RAKNET_STARTED);
rakPeer[i]->SetMaximumIncomingConnections(NUM_PEERS);
rakPeer[i]->SetTimeoutTime(1000, MafiaNet::UNASSIGNED_SYSTEM_ADDRESS);
printf("%i. Our guid is %s\n", i, rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("%i. Our guid is %s\n", i, MafiaNet::to_string(rakPeer[i]->GetGuidFromSystemAddress(MafiaNet::UNASSIGNED_SYSTEM_ADDRESS)).c_str());
}

RakSleep(100);
Expand Down Expand Up @@ -87,14 +88,14 @@ int main()
{
case ID_FCM2_VERIFIED_JOIN_START:
{
printf("%s: Got ID_FCM2_VERIFIED_JOIN_START from %s. address=", rakPeer[peerIndex]->GetMyGUID().ToString(), packet->guid.ToString());
printf("%s: Got ID_FCM2_VERIFIED_JOIN_START from %s. address=", MafiaNet::to_string(rakPeer[peerIndex]->GetMyGUID()).c_str(), MafiaNet::to_string(packet->guid).c_str());
DataStructures::List<SystemAddress> addresses;
DataStructures::List<RakNetGUID> guids;
DataStructures::List<BitStream*> userData;
fcm2[peerIndex].GetVerifiedJoinRequiredProcessingList(packet->guid, addresses, guids, userData);
for (unsigned int i=0; i < guids.Size(); i++)
{
printf("%s:", guids[i].ToString());
printf("%s:", MafiaNet::to_string(guids[i]).c_str());
ConnectionAttemptResult car = rakPeer[peerIndex]->Connect(addresses[i].ToString(false), addresses[i].GetPort(), 0, 0);
switch (car)
{
Expand All @@ -121,7 +122,7 @@ int main()
break;

case ID_FCM2_VERIFIED_JOIN_FAILED:
printf("%s: ID_FCM2_VERIFIED_JOIN_FAILED from %s\n", rakPeer[peerIndex]->GetMyGUID().ToString(), packet->guid.ToString());
printf("%s: ID_FCM2_VERIFIED_JOIN_FAILED from %s\n", MafiaNet::to_string(rakPeer[peerIndex]->GetMyGUID()).c_str(), MafiaNet::to_string(packet->guid).c_str());
break;

case ID_FCM2_VERIFIED_JOIN_CAPABLE:
Expand All @@ -131,7 +132,7 @@ int main()
RakString testStr;
bs.Read(testStr);

printf("%s: ID_FCM2_VERIFIED_JOIN_CAPABLE from %s\n", rakPeer[peerIndex]->GetMyGUID().ToString(), packet->guid.ToString());
printf("%s: ID_FCM2_VERIFIED_JOIN_CAPABLE from %s\n", MafiaNet::to_string(rakPeer[peerIndex]->GetMyGUID()).c_str(), MafiaNet::to_string(packet->guid).c_str());
printf("STR: %s\n", testStr.C_String());
fcm2[peerIndex].RespondOnVerifiedJoinCapable(packet, true, 0);
}
Expand All @@ -145,21 +146,21 @@ int main()
fcm2[peerIndex].GetVerifiedJoinAcceptedAdditionalData(packet, &thisSystemAccepted, systemsAccepted, &additionalData);
if (thisSystemAccepted)
{
printf("%s: ID_FCM2_VERIFIED_JOIN_ACCEPTED from %s. systemsAccepted=", rakPeer[peerIndex]->GetMyGUID().ToString(), packet->guid.ToString());
printf("%s: ID_FCM2_VERIFIED_JOIN_ACCEPTED from %s. systemsAccepted=", MafiaNet::to_string(rakPeer[peerIndex]->GetMyGUID()).c_str(), MafiaNet::to_string(packet->guid).c_str());
for (unsigned int i=0; i < systemsAccepted.Size(); i++)
printf("%s ", systemsAccepted[i].ToString());
printf("%s ", MafiaNet::to_string(systemsAccepted[i]).c_str());
printf("\n");
}
break;
}

case ID_FCM2_VERIFIED_JOIN_REJECTED:
printf("%s: ID_FCM2_VERIFIED_JOIN_REJECTED from %s\n", rakPeer[peerIndex]->GetMyGUID().ToString(), packet->guid.ToString());
printf("%s: ID_FCM2_VERIFIED_JOIN_REJECTED from %s\n", MafiaNet::to_string(rakPeer[peerIndex]->GetMyGUID()).c_str(), MafiaNet::to_string(packet->guid).c_str());
rakPeer[peerIndex]->CloseConnection(packet->guid, true);
break;

default:
printf("%s: %s from %s\n", rakPeer[peerIndex]->GetMyGUID().ToString(), PacketLogger::BaseIDTOString(packet->data[0]), packet->guid.ToString());
printf("%s: %s from %s\n", MafiaNet::to_string(rakPeer[peerIndex]->GetMyGUID()).c_str(), PacketLogger::BaseIDTOString(packet->data[0]), MafiaNet::to_string(packet->guid).c_str());
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions Samples/LANServerDiscovery/LANServerDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "mafianet/Gets.h"
#include "mafianet/linux_adapter.h"
#include "mafianet/osx_adapter.h"
#include "mafianet/guid_util.h"

int main(void)
{
Expand Down Expand Up @@ -161,11 +162,11 @@ int main(void)
}
else if (p->data[0]==ID_UNCONNECTED_PING)
{
printf("ID_UNCONNECTED_PING from %s\n",p->guid.ToString());
printf("ID_UNCONNECTED_PING from %s\n",MafiaNet::to_string(p->guid).c_str());
}
else if (p->data[0]==ID_UNCONNECTED_PING_OPEN_CONNECTIONS)
{
printf("ID_UNCONNECTED_PING_OPEN_CONNECTIONS from %s\n",p->guid.ToString());
printf("ID_UNCONNECTED_PING_OPEN_CONNECTIONS from %s\n",MafiaNet::to_string(p->guid).c_str());
}
client->DeallocatePacket(p);
}
Expand Down
7 changes: 4 additions & 3 deletions Samples/NATCompleteClient/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "mafianet/Itoa.h"
#include "mafianet/linux_adapter.h"
#include "mafianet/osx_adapter.h"
#include "mafianet/guid_util.h"

// To include miniupnp, see Samples\NATCompleteClient\readme.txt
#include "miniupnpc.h"
Expand Down Expand Up @@ -428,7 +429,7 @@ struct NatPunchthoughClientFramework : public SampleFramework, public NatPunchth
else
{
printf("Listening\n");
printf("My GUID is %s\n", rakPeer->GetMyGUID().ToString());
printf("My GUID is %s\n", MafiaNet::to_string(rakPeer->GetMyGUID()).c_str());
isListening=true;

// Find the stride of our router in advance
Expand Down Expand Up @@ -657,7 +658,7 @@ struct UDPProxyClientFramework : public SampleFramework, public UDPProxyClientRe
else
{
printf("Listening\n");
printf("My GUID is %s\n", rakPeer->GetGuidFromSystemAddress(UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("My GUID is %s\n", MafiaNet::to_string(rakPeer->GetGuidFromSystemAddress(UNASSIGNED_SYSTEM_ADDRESS)).c_str());
isListening=true;
}

Expand Down Expand Up @@ -818,7 +819,7 @@ void PrintPacketMessages(Packet *packet, RakPeerInterface *rakPeer)

case ID_CONNECTION_REQUEST_ACCEPTED:
// This tells the client they have connected
printf("ID_CONNECTION_REQUEST_ACCEPTED to %s with GUID %s\n", packet->systemAddress.ToString(true), packet->guid.ToString());
printf("ID_CONNECTION_REQUEST_ACCEPTED to %s with GUID %s\n", packet->systemAddress.ToString(true), MafiaNet::to_string(packet->guid).c_str());
printf("My external address is %s\n", rakPeer->GetExternalID(packet->systemAddress).ToString(true));
break;
}
Expand Down
Loading
Loading