From 55cdf75c5f689eed945554966a02de957a6c2271 Mon Sep 17 00:00:00 2001 From: lidgren Date: Thu, 9 Dec 2010 21:51:03 +0000 Subject: [PATCH] Exposed the Socket in NetPeer --- Lidgren.Network/NetConnection.cs | 3 --- Lidgren.Network/NetPeer.Internal.cs | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Lidgren.Network/NetConnection.cs b/Lidgren.Network/NetConnection.cs index 929d548..869fd2e 100644 --- a/Lidgren.Network/NetConnection.cs +++ b/Lidgren.Network/NetConnection.cs @@ -303,9 +303,6 @@ namespace Lidgren.Network case NetDeliveryMethod.ReliableSequenced: case NetDeliveryMethod.ReliableUnordered: default: - // - // TODO: this is placeholder! - // chan = new NetReliableSenderChannel(this, NetUtility.GetWindowSize(method)); break; } diff --git a/Lidgren.Network/NetPeer.Internal.cs b/Lidgren.Network/NetPeer.Internal.cs index 0c7185d..cd3a736 100644 --- a/Lidgren.Network/NetPeer.Internal.cs +++ b/Lidgren.Network/NetPeer.Internal.cs @@ -34,6 +34,11 @@ namespace Lidgren.Network private AutoResetEvent m_messageReceivedEvent = new AutoResetEvent(false); + /// + /// Gets the socket, if Start() has been called + /// + public Socket Socket { get { return m_socket; } } + internal void ReleaseMessage(NetIncomingMessage msg) { NetException.Assert(msg.m_incomingMessageType != NetIncomingMessageType.Error);