SocketException.cs 718 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // System.Net.Sockets.NetworkStream.cs
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. //
  7. // (C) 2002 Ximian, Inc.
  8. //
  9. using System;
  10. using System.Runtime.Serialization;
  11. using System.Globalization;
  12. using System.ComponentModel;
  13. namespace System.Net.Sockets
  14. {
  15. public class SocketException : Win32Exception {
  16. // Constructors
  17. public SocketException ()
  18. : base (Locale.GetText ("Socket exception"))
  19. {
  20. }
  21. public SocketException (int code)
  22. : base (Locale.GetText ("Socket exception"), code)
  23. {
  24. }
  25. protected SocketException(SerializationInfo info, StreamingContext context)
  26. : base (info, context) {
  27. }
  28. public override int ErrorCode {
  29. get {
  30. return NativeErrorCode;
  31. }
  32. }
  33. }
  34. }