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

LingerOption.cs « System.Net.Sockets « System « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4c6117f50359280a060edac51686eb31ba340b37 (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
42
//
// System.Net.Sockets.LingerOption.cs
//
// Author:
//   Andrew Sutton
//
// (C) Andrew Sutton
//

using System;

namespace System.Net.Sockets
{
	// <remarks>
	//   Encapsulates a linger option.
	// </remarks>
	public class LingerOption
	{
		// Don't change the names of these fields without also
		// changing socket-io.c in the runtime
		private bool	enabled;
		protected int	seconds;

		public LingerOption (bool enable, int secs)
		{
			enabled = enable;
			seconds = secs;
		}

		public bool Enabled
		{
			get { return enabled; }
			set { enabled = value; }
		}

		public int LingerTime
		{
			get { return seconds; }
			set { seconds = value; }
		}
	}
}