You've already forked lidgren-network-gen3
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user