Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Sockets / LingerOption.cs / 1305376 / LingerOption.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net.Sockets {
using System;
///
/// Contains information for a socket's linger time, the amount of time it will
/// remain after closing if data remains to be sent.
///
public class LingerOption {
bool enabled;
int lingerTime;
///
///
/// Initializes a new instance of the class.
///
///
public LingerOption(bool enable, int seconds) {
Enabled = enable;
LingerTime = seconds;
}
///
///
/// Enables or disables lingering after
/// close.
///
///
public bool Enabled {
get {
return enabled;
}
set {
enabled = value;
}
}
///
///
/// The amount of time, in seconds, to remain connected after a close.
///
///
public int LingerTime {
get {
return lingerTime;
}
set {
lingerTime = value;
}
}
} // class LingerOption
} // namespace System.Net.Sockets
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net.Sockets {
using System;
///
/// Contains information for a socket's linger time, the amount of time it will
/// remain after closing if data remains to be sent.
///
public class LingerOption {
bool enabled;
int lingerTime;
///
///
/// Initializes a new instance of the class.
///
///
public LingerOption(bool enable, int seconds) {
Enabled = enable;
LingerTime = seconds;
}
///
///
/// Enables or disables lingering after
/// close.
///
///
public bool Enabled {
get {
return enabled;
}
set {
enabled = value;
}
}
///
///
/// The amount of time, in seconds, to remain connected after a close.
///
///
public int LingerTime {
get {
return lingerTime;
}
set {
lingerTime = value;
}
}
} // class LingerOption
} // namespace System.Net.Sockets
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- List.cs
- QueryCacheKey.cs
- Merger.cs
- RenderData.cs
- DataGridViewColumnTypeEditor.cs
- PlaceHolder.cs
- DrawingVisualDrawingContext.cs
- RequestTimeoutManager.cs
- Privilege.cs
- SubclassTypeValidator.cs
- GPPOINT.cs
- _AutoWebProxyScriptHelper.cs
- AxisAngleRotation3D.cs
- PatternMatcher.cs
- WrappedDispatcherException.cs
- TriggerCollection.cs
- HelpInfo.cs
- MenuStrip.cs
- LicenseException.cs
- ControlCollection.cs
- Avt.cs
- NativeActivityTransactionContext.cs
- MSG.cs
- ConnectionManagementElementCollection.cs
- followingsibling.cs
- NumericUpDownAccelerationCollection.cs
- Table.cs
- SessionStateUtil.cs
- IndexedEnumerable.cs
- Identity.cs
- XmlSortKeyAccumulator.cs
- _NetRes.cs
- VisualCollection.cs
- DocumentSchemaValidator.cs
- SingleSelectRootGridEntry.cs
- ConfigurationSettings.cs
- StylusOverProperty.cs
- Renderer.cs
- HttpRawResponse.cs
- MenuItem.cs
- PeerCustomResolverBindingElement.cs
- SqlDataSourceSelectingEventArgs.cs
- StringValidatorAttribute.cs
- LogRecordSequence.cs
- DataObjectPastingEventArgs.cs
- ExpressionCopier.cs
- CanonicalFontFamilyReference.cs
- MsmqAuthenticationMode.cs
- TagPrefixAttribute.cs
- SafeSecurityHelper.cs
- ReadOnlyPropertyMetadata.cs
- AmbiguousMatchException.cs
- SerializationInfo.cs
- CodeBlockBuilder.cs
- OleDbPermission.cs
- ValidationErrorEventArgs.cs
- ListDesigner.cs
- CompoundFileDeflateTransform.cs
- SrgsRulesCollection.cs
- DeferredRunTextReference.cs
- PartitionResolver.cs
- HighContrastHelper.cs
- CodeAttributeArgument.cs
- XmlEnumAttribute.cs
- CTreeGenerator.cs
- MessageDecoder.cs
- SettingsBase.cs
- StatusInfoItem.cs
- SliderAutomationPeer.cs
- diagnosticsswitches.cs
- SqlServices.cs
- ImageMapEventArgs.cs
- PropertyMapper.cs
- WorkflowRuntimeBehavior.cs
- XmlNavigatorFilter.cs
- DocumentEventArgs.cs
- SrgsOneOf.cs
- HyperLink.cs
- CodeTypeDeclarationCollection.cs
- Tracer.cs
- CodeParameterDeclarationExpression.cs
- Help.cs
- MenuItemStyle.cs
- ControlBuilder.cs
- ImageCodecInfoPrivate.cs
- HeaderedContentControl.cs
- CompilerHelpers.cs
- InvokeSchedule.cs
- EventListener.cs
- SafeArrayTypeMismatchException.cs
- OutputScopeManager.cs
- Stylesheet.cs
- ParameterToken.cs
- RegexNode.cs
- MruCache.cs
- DecimalKeyFrameCollection.cs
- OciEnlistContext.cs
- ToolBar.cs
- Size3DValueSerializer.cs
- StartUpEventArgs.cs