Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Sockets / SocketInformation.cs / 1305376 / SocketInformation.cs
using System.Runtime.Serialization;
namespace System.Net.Sockets {
[Serializable]
public struct SocketInformation{
byte[] protocolInformation;
SocketInformationOptions options;
[OptionalField]
EndPoint remoteEndPoint;
public byte[] ProtocolInformation{
get{
return protocolInformation;
}
set{
protocolInformation = value;
}
}
public SocketInformationOptions Options{
get{
return options;
}
set{
options = value;
}
}
internal bool IsNonBlocking{
get{
return ((options&SocketInformationOptions.NonBlocking)!=0);
}
set{
if(value){
options |= SocketInformationOptions.NonBlocking;
}
else{
options &= ~SocketInformationOptions.NonBlocking;
}
}
}
internal bool IsConnected{
get{
return ((options&SocketInformationOptions.Connected)!=0);
}
set{
if(value){
options |= SocketInformationOptions.Connected;
}
else{
options &= ~SocketInformationOptions.Connected;
}
}
}
internal bool IsListening{
get{
return ((options&SocketInformationOptions.Listening)!=0);
}
set{
if(value){
options |= SocketInformationOptions.Listening;
}
else{
options &= ~SocketInformationOptions.Listening;
}
}
}
internal bool UseOnlyOverlappedIO{
get{
return ((options&SocketInformationOptions.UseOnlyOverlappedIO)!=0);
}
set{
if(value){
options |= SocketInformationOptions.UseOnlyOverlappedIO;
}
else{
options &= ~SocketInformationOptions.UseOnlyOverlappedIO;
}
}
}
internal EndPoint RemoteEndPoint{
get{
return remoteEndPoint;
}
set{
remoteEndPoint = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System.Runtime.Serialization;
namespace System.Net.Sockets {
[Serializable]
public struct SocketInformation{
byte[] protocolInformation;
SocketInformationOptions options;
[OptionalField]
EndPoint remoteEndPoint;
public byte[] ProtocolInformation{
get{
return protocolInformation;
}
set{
protocolInformation = value;
}
}
public SocketInformationOptions Options{
get{
return options;
}
set{
options = value;
}
}
internal bool IsNonBlocking{
get{
return ((options&SocketInformationOptions.NonBlocking)!=0);
}
set{
if(value){
options |= SocketInformationOptions.NonBlocking;
}
else{
options &= ~SocketInformationOptions.NonBlocking;
}
}
}
internal bool IsConnected{
get{
return ((options&SocketInformationOptions.Connected)!=0);
}
set{
if(value){
options |= SocketInformationOptions.Connected;
}
else{
options &= ~SocketInformationOptions.Connected;
}
}
}
internal bool IsListening{
get{
return ((options&SocketInformationOptions.Listening)!=0);
}
set{
if(value){
options |= SocketInformationOptions.Listening;
}
else{
options &= ~SocketInformationOptions.Listening;
}
}
}
internal bool UseOnlyOverlappedIO{
get{
return ((options&SocketInformationOptions.UseOnlyOverlappedIO)!=0);
}
set{
if(value){
options |= SocketInformationOptions.UseOnlyOverlappedIO;
}
else{
options &= ~SocketInformationOptions.UseOnlyOverlappedIO;
}
}
}
internal EndPoint RemoteEndPoint{
get{
return remoteEndPoint;
}
set{
remoteEndPoint = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SendMailErrorEventArgs.cs
- XmlCharType.cs
- COSERVERINFO.cs
- NotifyInputEventArgs.cs
- PersonalizationStateQuery.cs
- CheckedPointers.cs
- WorkflowQueuingService.cs
- Switch.cs
- TreeNodeSelectionProcessor.cs
- ButtonBaseAutomationPeer.cs
- Socket.cs
- Interfaces.cs
- TextDecorationCollectionConverter.cs
- ProfileGroupSettings.cs
- ButtonBaseDesigner.cs
- CategoryList.cs
- PreviewPrintController.cs
- Preprocessor.cs
- DesignerLoader.cs
- KeyboardNavigation.cs
- EmptyElement.cs
- CollectionViewGroupInternal.cs
- DebugView.cs
- HttpWebResponse.cs
- ThreadStartException.cs
- ApplicationDirectory.cs
- SqlConnectionPoolProviderInfo.cs
- BindToObject.cs
- SqlInfoMessageEvent.cs
- SqlCommand.cs
- EdgeProfileValidation.cs
- LookupBindingPropertiesAttribute.cs
- InvokePatternIdentifiers.cs
- Identifier.cs
- Label.cs
- AdjustableArrowCap.cs
- PropertyValueChangedEvent.cs
- ServiceModelActivationSectionGroup.cs
- FamilyMapCollection.cs
- InteropAutomationProvider.cs
- XmlBindingWorker.cs
- ImageFormat.cs
- ISAPIRuntime.cs
- RegexParser.cs
- MemberMaps.cs
- DataGridViewSelectedCellCollection.cs
- SpeechEvent.cs
- UserControlBuildProvider.cs
- ByteRangeDownloader.cs
- ListenerBinder.cs
- NameObjectCollectionBase.cs
- XmlMapping.cs
- _SafeNetHandles.cs
- ValueCollectionParameterReader.cs
- TraceRecord.cs
- XmlSchemaInfo.cs
- StrongNamePublicKeyBlob.cs
- CacheSection.cs
- SpellerError.cs
- Container.cs
- ConfigXmlText.cs
- PersonalizableAttribute.cs
- ObjectRef.cs
- Queue.cs
- wmiprovider.cs
- EncoderParameter.cs
- CodeParameterDeclarationExpressionCollection.cs
- WpfPayload.cs
- SystemIdentity.cs
- ManipulationPivot.cs
- VectorCollectionConverter.cs
- StreamWriter.cs
- _BasicClient.cs
- LinkedResource.cs
- CompositeDuplexBindingElementImporter.cs
- ExpressionBuilder.cs
- CircleHotSpot.cs
- TypeSemantics.cs
- DynamicAttribute.cs
- XPathNode.cs
- SourceLineInfo.cs
- SystemIPInterfaceStatistics.cs
- SQLStringStorage.cs
- SafePEFileHandle.cs
- ServiceOperation.cs
- CodeTypeMember.cs
- ElementFactory.cs
- WebPartExportVerb.cs
- PlainXmlSerializer.cs
- InternalBufferOverflowException.cs
- DisplayClaim.cs
- Type.cs
- SqlDataSourceCache.cs
- GlyphShapingProperties.cs
- IncrementalCompileAnalyzer.cs
- PropertyNames.cs
- LicenseManager.cs
- FtpWebResponse.cs
- CharEntityEncoderFallback.cs
- AppDomainFactory.cs