PageRenderTime 41ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/MSNPSHARP_DEV/ProxyServer/AuthNone.cs

http://msnp-sharp.googlecode.com/
C# | 48 lines | 10 code | 4 blank | 34 comment | 0 complexity | e5d81db8a4633ebf8d49d66ef5f00e1f MD5 | raw file
  1. /*
  2. Copyright Š 2002, The KPD-Team
  3. All rights reserved.
  4. http://www.mentalis.org/
  5. Redistribution and use in source and binary forms, with or without
  6. modification, are permitted provided that the following conditions
  7. are met:
  8. - Redistributions of source code must retain the above copyright
  9. notice, this list of conditions and the following disclaimer.
  10. - Neither the name of the KPD-Team, nor the names of its contributors
  11. may be used to endorse or promote products derived from this
  12. software without specific prior written permission.
  13. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  14. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  15. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  16. FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  17. THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  18. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  20. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  21. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  22. STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  23. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  24. OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. using System.Net.Sockets;
  27. using Org.Mentalis.Proxy.Socks.Authentication;
  28. namespace Org.Mentalis.Proxy.Socks.Authentication {
  29. ///<summary>Authenticates a user on a SOCKS5 server according to the 'No Authentication' subprotocol.</summary>
  30. internal sealed class AuthNone : AuthBase {
  31. ///<summary>Initializes a new instance of the AuthNone class.</summary>
  32. public AuthNone() {}
  33. ///<summary>Calls the parent class to inform it authentication is complete.</summary>
  34. ///<param name="Connection">The connection with the SOCKS client.</param>
  35. ///<param name="Callback">The method to call when the authentication is complete.</param>
  36. internal override void StartAuthentication(Socket Connection, AuthenticationCompleteDelegate Callback) {
  37. Callback(true);
  38. }
  39. }
  40. }