Rank: Newbie Groups: Member
Joined: 10/13/2009 Posts: 2 Points: 6
|
Hello! I use the XF Server to receive serialized data and to write them to a database.
I want to send data of size about 10.000bytes to the server. While i am sending data until a size of about 1460 to the server, it works really fine! But above 1460, so for instance i send 1490, the Deserialization fails! Then i tried to see what packages the fragment with ping -f -l 1471 80.40.194.93 it fragments the packages! So.. how do i handle fragmented packages with xf server?! Does this xf server or should i handle this on my own?
Thank you for your help! Regards, Stefan
My server code looks like this: (OnDataReceived fires the event which will deserialize the data)
_listener = _network.AcceptAsync(new IPEndPoint(IPAddress.Any, MyConst.ServerPort), ProcessClient);
private void ProcessClient(IConnection connection) { byte[] buffer = new byte[10 << 14]; connection.ReadAsync(buffer,
(length, ignore) => { if (length == 0) return;
try { OnDataReceived(connection, buffer); } catch (Exception ex) { Log.Error(ex); } },
(error, ignore) => { Log.Error(error); },
null); }
|
Rank: Administration Groups: Administration
Joined: 2/15/2008 Posts: 130 Points: 835
|
|
Rank: Newbie Groups: Member
Joined: 10/13/2009 Posts: 2 Points: 6
|
ok thank you for your quick response!
i can't see the other topics in this forum :( but with the link it works..
regards
|