Hi,
I am working on a school assignment and I am creating server-client application where server is sending information about the scene (vertex-fragment map and depth map). Client receives the information and according to these data it re-creates a model from server.
The problem is: I need to send approximately 111 messages 500-8000 bytes long (vert.frag. map + depth map) and 220messages with 4012 bytes (colour Texture). I managed to send it in chunks with little breaks like this: (but it is soooo sooo slow 50+ seconds)
Update
{
If (Time.time – lastMovement >1.5f) // every 1.5 seconds send some new data
{
Index++;
sendSomeParts (index);
}
}
sendSomeParts (int index)
{
for (int i=index*10;i<(index+1)*10;i++) // send 0-9, 10-19, …
NetworkTransport.send (ClientID, allData[i].msg, ReliableFragmented);
}
I found out that if I send bigger parts or faster (less than 1.5s) some messages are ignored by client and are lost. (even if reliable channel is used) (maybe the client buffer for incoming messages is overwhelmed?)
I was playing with the settings of network but it didn’t make any difference.
GlobalConfig gConfig = new GlobalConfig();
gConfig.ReactorMaximumReceivedMessages = 65535;
gConfig.ReactorModel= ReactorModel.SelectReactor;
gConfig.ThreadAwakeTimeout=1;
NetworkTransport.Init(gConfig);
Can you please help me to find better solution or what should I do with config?
Thank you.
PS: I am making a kind of real-time application so I think WWW class is not an option.