Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SocketException.cs « System.Net.Sockets « System « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 161a7cf27ae2f48af6decb470e788cf5596ece52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// System.Net.Sockets.NetworkStream.cs
//
// Author:
//	Dick Porter <dick@ximian.com>
//
// (C) 2002 Ximian, Inc.
//

using System.Runtime.Serialization;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace System.Net.Sockets
{
	[Serializable]
	public class SocketException : Win32Exception
	{
		[MethodImplAttribute(MethodImplOptions.InternalCall)]
		private static extern int WSAGetLastError_internal();
		
		public SocketException ()
			: base (WSAGetLastError_internal()) {
		}

		public SocketException (int error)
			: base (error) {
		}

		protected SocketException (SerializationInfo info,
					StreamingContext context)
			: base (info, context) {
		}
		
		public override int ErrorCode {
			get {
				return NativeErrorCode;
			}
		}
	}
}