Hi!
Server-code
#include "DarkGDK.h"
#include "multisync.h"
unsigned char IdentByte;
float lastMsg;
void DarkGDK ( void )
{
NetSetPort(23);
NetHost(10);
int te = 0;
while ( LoopGDK ( ) )
{
te = NetPlayerJoined();
while(te > 0)
{
te = NetPlayerJoined();
}
te = NetGetMessage();
while(te > 0)
{
lastMsg = NetGetFloat();
te = NetGetMessage();
}
dbPrint(dbStr(lastMsg));
/* dbPrint( dbStr(lastMsg) );
dbPrint( "Players online" );
dbPrint( dbStr(NetGetPlayerAmount()) ); */
dbSync();
}
return;
}
client-source
#include "DarkGDK.h"
#include <multisync.h>
unsigned char IdentByte;
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
NetSetPort(23);
NetConnect("127.0.0.1");
while ( LoopGDK ( ) )
{
if(dbKeyState(17))
{
IdentByte = 1;
float msg = 1337.1337;
// NetPutByte(IdentByte);
NetPutFloat(msg);
NetSendAll();
dbPrint("Data sent");
}
dbSync ( );
}
return;
}
I just dont get the message at the server ... even when trying locally with 127.0.0.1