1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

NetPeerConfiguration.AutoFlushSendQueue added. When set to false; application must call NetPeer.FlushSendQueue manually.

This commit is contained in:
lidgren
2011-09-12 09:34:50 +00:00
parent b4fd011e5b
commit 60a6b28189
4 changed files with 39 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ namespace ChatClient
s_form = new Form1();
NetPeerConfiguration config = new NetPeerConfiguration("chat");
config.AutoFlushSendQueue = false;
s_client = new NetClient(config);
s_client.RegisterReceivedCallback(new SendOrPostCallback(GotMessage));
@@ -95,6 +96,7 @@ namespace ChatClient
NetOutgoingMessage om = s_client.CreateMessage(text);
s_client.SendMessage(om, NetDeliveryMethod.ReliableOrdered);
Output("Sending '" + text + "'");
s_client.FlushSendQueue();
}
// called by the UI