* Makefile: Added new targets for running the tests. Now the generated
[mono.git] / mcs / class / System / System.Net.Sockets / LingerOption.cs
1 //
2 // System.Net.Sockets.LingerOption.cs
3 //
4 // Author:
5 //   Andrew Sutton
6 //
7 // (C) Andrew Sutton
8 //
9
10 using System;
11
12 namespace System.Net.Sockets
13 {
14         // <remarks>
15         //   Encapsulates a linger option.
16         // </remarks>
17         public class LingerOption
18         {
19                 // Don't change the names of these fields without also
20                 // changing socket-io.c in the runtime
21                 private bool    enabled;
22                 protected int   seconds;
23
24                 public LingerOption (bool enable, int secs)
25                 {
26                         enabled = enable;
27                         seconds = secs;
28                 }
29
30                 public bool Enabled
31                 {
32                         get { return enabled; }
33                         set { enabled = value; }
34                 }
35
36                 public int LingerTime
37                 {
38                         get { return seconds; }
39                         set { seconds = value; }
40                 }
41         }
42 }