Sync / Messages problem
#1

Код:
#include <a_samp>
main(){}

public OnGameModeInit()
{
	UsePlayerPedAnims();
	AddPlayerClass(0,488.1703,-14.2043,1000.6797,17.7887,-1,-1,-1,-1,-1,-1);
	return 1;
}

public OnPlayerRequestClass(playerid,classid)
{
	SetSpawnInfo(playerid,1,0,2578.3943,1013.2123,10.4721,1.0,-1,-1,-1,-1,-1,-1);
	SpawnPlayer(playerid);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext,"/traf")==0)
	{
		new st[256];
		for(new i=0;i<1000;i++)
		{
			format(st,sizeof(st),"%i",i);
			SendClientMessage(playerid,-1,st);
		}
	}
	return 1;
}
You can test it on localhost (127.0.0.1) or on host
when you enter command /traf, 1000 client messages will send you, but not instant, it will take few seconds
1 client message - 1 packet message
if you enter command again and again 1000 packet messages will be send faster and faster

Ofcource nobody will do this, but when you teleport to place with 500 objects, every object has SetMaterial, server will send you 1000 packet messages too, at this few seconds server didn't send any other packet type, chat will freeze, you will think it's lag

it's not connection problem or CPU problem, it's work same on localhost

on host you can test speed - download will be >1MB/s

it's not stable, server can send you 1000 messages instant, or 100 messages in second and take to it 10 sec

Why packet sending is limited by server? why server wait to send packages?
Reply
#2

I suspect it's just lagg. The server can send packets this fast indeed, but it takes time to draw these messages on your screen.
Reply
#3

Quote:
Originally Posted by Sinner
Посмотреть сообщение
I suspect it's just lagg.
There is no lag's on localhost,
and if I had download speed >1MB/s on host, why it need >1 sec for send 1000 packets ~30KB?

Quote:
Originally Posted by Sinner
Посмотреть сообщение
The server can send packets this fast indeed, but it takes time to draw these messages on your screen.
and every next time I call /traf messages drawing faster?
no it's not problem of drawing messages
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)