From fd7d99b9c48ce1bc383e59b6dcab38a9059969b3 Mon Sep 17 00:00:00 2001 From: lidgren Date: Mon, 13 Sep 2010 13:52:21 +0000 Subject: [PATCH] Added NetConnection.CreateMessage method in addition to NetPeer.CreateMessage --- Lidgren.Network/NetConnection.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Lidgren.Network/NetConnection.cs b/Lidgren.Network/NetConnection.cs index 312de3a..7103f1d 100644 --- a/Lidgren.Network/NetConnection.cs +++ b/Lidgren.Network/NetConnection.cs @@ -653,6 +653,23 @@ namespace Lidgren.Network m_unsentMessages.Enqueue(send); } + /// + /// Creates a new message for sending + /// + public NetOutgoingMessage CreateMessage() + { + return m_owner.CreateMessage(); + } + + /// + /// Creates a new message for sending + /// + /// initial capacity in bytes + public NetOutgoingMessage CreateMessage(int initialCapacity) + { + return m_owner.CreateMessage(initialCapacity); + } + public bool SendMessage(NetOutgoingMessage msg, NetDeliveryMethod method) { return SendMessage(msg, method, 0);