mscorlib(4.0.0.0) API with additions
SocketInformation.cs
2 
3 namespace System.Net.Sockets
4 {
7  public struct SocketInformation
8  {
9  private byte[] protocolInformation;
10 
11  private SocketInformationOptions options;
12 
13  [OptionalField]
14  private EndPoint remoteEndPoint;
15 
18  public byte[] ProtocolInformation
19  {
20  get
21  {
22  return protocolInformation;
23  }
24  set
25  {
26  protocolInformation = value;
27  }
28  }
29 
33  {
34  get
35  {
36  return options;
37  }
38  set
39  {
40  options = value;
41  }
42  }
43 
44  internal bool IsNonBlocking
45  {
46  get
47  {
48  return (options & SocketInformationOptions.NonBlocking) != (SocketInformationOptions)0;
49  }
50  set
51  {
52  if (value)
53  {
54  options |= SocketInformationOptions.NonBlocking;
55  }
56  else
57  {
58  options &= ~SocketInformationOptions.NonBlocking;
59  }
60  }
61  }
62 
63  internal bool IsConnected
64  {
65  get
66  {
67  return (options & SocketInformationOptions.Connected) != (SocketInformationOptions)0;
68  }
69  set
70  {
71  if (value)
72  {
73  options |= SocketInformationOptions.Connected;
74  }
75  else
76  {
77  options &= ~SocketInformationOptions.Connected;
78  }
79  }
80  }
81 
82  internal bool IsListening
83  {
84  get
85  {
86  return (options & SocketInformationOptions.Listening) != (SocketInformationOptions)0;
87  }
88  set
89  {
90  if (value)
91  {
92  options |= SocketInformationOptions.Listening;
93  }
94  else
95  {
96  options &= ~SocketInformationOptions.Listening;
97  }
98  }
99  }
100 
101  internal bool UseOnlyOverlappedIO
102  {
103  get
104  {
105  return (options & SocketInformationOptions.UseOnlyOverlappedIO) != (SocketInformationOptions)0;
106  }
107  set
108  {
109  if (value)
110  {
111  options |= SocketInformationOptions.UseOnlyOverlappedIO;
112  }
113  else
114  {
115  options &= ~SocketInformationOptions.UseOnlyOverlappedIO;
116  }
117  }
118  }
119 
120  internal EndPoint RemoteEndPoint
121  {
122  get
123  {
124  return remoteEndPoint;
125  }
126  set
127  {
128  remoteEndPoint = value;
129  }
130  }
131  }
132 }
Definition: __Canon.cs:3
byte [] ProtocolInformation
Gets or sets the protocol information for a T:System.Net.Sockets.Socket.
SocketInformationOptions
Describes states for a T:System.Net.Sockets.Socket.
SocketInformationOptions Options
Gets or sets the options for a T:System.Net.Sockets.Socket.
Encapsulates the information that is necessary to duplicate a T:System.Net.Sockets....
Specifies that the class can be serialized.
Identifies a network address. This is an abstract class.
Definition: EndPoint.cs:8