Home
Discussion Forums
Tutorials & Source Code
Developer Blogs
Developer Events
Developer Jobs
Labs
We need you!
We're working hard on the next version of Developer Fusion -
Let us know
what you think we should be up to!
The Labs
\
Source Viewer
\
SSCLI
\
System.Net
\ AddressInfoHints
Object Browser
Solution Explorer
SSCLI
Expand
Microsoft.Win32
Expand
Microsoft.Win32.SafeHandles
Expand
System
Expand
System.Runtime.Hosting
Expand
System.Runtime.InteropServices
Expand
System.Runtime.CompilerServices
Expand
System.Collections
Expand
System.Collections.Generic
Expand
System.Collections.ObjectModel
Expand
System.Configuration.Assemblies
Expand
System.Diagnostics
Expand
System.Diagnostics.CodeAnalysis
Expand
System.Diagnostics.SymbolStore
Expand
System.Globalization
Expand
System.IO
Expand
System.IO.IsolatedStorage
Expand
System.Reflection
Expand
System.Reflection.Cache
Expand
System.Reflection.Emit
Expand
System.Resources
Expand
System.Runtime
Expand
System.Runtime.InteropServices.Expando
Expand
System.Runtime.ConstrainedExecution
Expand
System.Runtime.Remoting.Activation
Expand
System.Runtime.Remoting.Messaging
Expand
System.Runtime.Remoting.Channels
Expand
System.Runtime.Remoting.Lifetime
Expand
System.Runtime.Remoting
Expand
System.Runtime.Remoting.Contexts
Expand
System.Runtime.Remoting.Proxies
Expand
System.Runtime.Remoting.Metadata
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
Expand
System.Runtime.Remoting.Services
Expand
System.Runtime.Serialization
Expand
System.Runtime.Serialization.Formatters
Expand
System.Runtime.Serialization.Formatters.Binary
Expand
System.Runtime.Versioning
Expand
System.Security
Expand
System.Security.Cryptography
Expand
System.Security.Cryptography.X509Certificates
Expand
System.Security.Permissions
Expand
System.Security.Policy
Expand
System.Security.Principal
Expand
System.Security.Util
Expand
System.Text
Expand
System.Threading
Expand
System.Runtime.Remoting.Channels.Http
Expand
System.Runtime.Remoting.Channels.Tcp
Expand
System.Runtime.Remoting.MetadataServices
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
Expand
System.Runtime.Serialization.Formatters.Soap
Expand
Microsoft.Tools.Caspol
Expand
Microsoft.Tools.Build
Expand
Microsoft.CSharp
Expand
System.CodeDom
Expand
System.CodeDom.Compiler
Expand
System.Collections.Specialized
Expand
System.ComponentModel
Expand
System.ComponentModel.Design
Expand
System.ComponentModel.Design.Serialization
Expand
System.Configuration
Expand
System.Web
Expand
System.Configuration.Provider
Expand
System.Configuration.Internal
Expand
System.Internal
Expand
System.Windows.Forms
Expand
System.Net
Expand
AbortState
Expand
AddressInfo
Expand
AddressInfoHints
Expand
AsyncConnectionPoolRequest
Expand
AsyncTriState
Expand
AuthenticationManager
Expand
AuthenticationState
Expand
Authorization
Expand
AutoWebProxyScriptEngine
Expand
AutoWebProxyScriptWrapper
Expand
AutoWebProxyScriptWrapper
Expand
AutoWebProxyState
Expand
BaseLoggingObject
Expand
BasicClient
Expand
Blob
Expand
Booleans
Expand
BufferChunkBytes
Expand
BufferOffsetSize
Expand
CallbackClosure
Expand
CaseInsensitiveAscii
Expand
ChunkParse
Expand
CloseExState
Expand
CommandStream
Expand
Comparer
Expand
Connection
Expand
ConnectionGroup
Expand
ConnectionModes
Expand
ConnectionMonitorEntry
Expand
ConnectionPool
Expand
ConnectionPoolManager
Expand
ConnectionReturnResult
Expand
ConnectSocketState
Expand
ConnectStream
Expand
ContextAwareResult
Expand
ControlData
Expand
ControlDataIPv6
Expand
Cookie
Expand
CookieCollection
Expand
CookieCollectionEnumerator
Expand
CookieContainer
Expand
CookieException
Expand
CookieModule
Expand
CookieParser
Expand
CookieToken
Expand
CookieTokenizer
Expand
CookieVariant
Expand
CoreResponseData
Expand
CredentialCache
Expand
CredentialEnumerator
Expand
CredentialHostKey
Expand
CredentialKey
Expand
DataParseStatus
Expand
DebugCriticalHandleMinusOneIsInvalid
Expand
DebugCriticalHandleZeroOrMinusOneIsInvalid
Expand
DebugSafeHandle
Expand
DebugSafeHandleMinusOneIsInvalid
Expand
DecompressionMethods
Expand
DefaultPorts
Expand
DeflateWrapperStream
Expand
DelayedRegex
Expand
DirectProxy
Expand
Dns
Expand
DnsPermission
Expand
DnsPermissionAttribute
Expand
DownloadBitsState
Expand
DownloadDataCompletedEventArgs
Expand
DownloadProgressChangedEventArgs
Expand
DownloadStringCompletedEventArgs
Expand
EmptyStream
Expand
EmptyWebProxy
Expand
EndPoint
Expand
EndpointPermission
Expand
EndPointType
Expand
ErrorCodes
Expand
ExceptionHelper
Expand
File
Expand
FileWebRequest
Expand
FileWebRequestCreator
Expand
FileWebResponse
Expand
FileWebStream
Expand
Ftp
Expand
FtpControlStream
Expand
FtpDataStream
Expand
FtpLoginState
Expand
FtpMethodFlags
Expand
FtpMethodInfo
Expand
FtpOperation
Expand
FtpPrimitive
Expand
FtpStatusCode
Expand
FtpWebRequest
Expand
FtpWebRequestCreator
Expand
FtpWebResponse
Expand
GetPathOption
Expand
GlobalLog
Expand
GlobalProxySelection
Expand
GZipWrapperStream
Expand
HeaderEncoding
Expand
HeaderInfo
Expand
HeaderInfoTable
Expand
HeaderVariantInfo
Expand
hostent
Expand
Http
Expand
HttpBehaviour
Expand
HttpDateParse
Expand
HttpKnownHeaderNames
Expand
HttpProcessingResult
Expand
HttpProtocolUtils
Expand
HttpRequestCreator
Expand
HttpRequestHeader
Expand
HttpResponseHeader
Expand
HttpStatusCode
Expand
HttpVersion
Expand
HttpWebRequest
Expand
HttpWebRequestComparer
Expand
HttpWebResponse
Expand
HttpWriteMode
Expand
IAuthenticationModule
Expand
IAutoWebProxy
Expand
ICloseEx
Expand
ICredentialPolicy
Expand
ICredentials
Expand
ICredentialsByHost
Expand
InfiniteTimer
Expand
InfiniteTimerQueue
Expand
InnerSafeCloseSocket
Expand
InterlockedGate
Expand
InterlockedStack
Expand
InternalException
Expand
IntPtrHelper
Expand
IPAddress
Expand
IPEndPoint
Expand
IPHostEntry
Expand
IPMulticastRequest
Expand
IPv6MulticastRequest
Expand
IReadChunkBytes
Expand
ISessionAuthenticationModule
Expand
IWebProxy
Expand
IWebProxyScript
Expand
IWebRequestCreate
Expand
KnownHttpVerb
Expand
LazyAsyncResult
Expand
Linger
Expand
Logging
Expand
MemoryChunk
Expand
MyMethodInfo
Expand
NameInfoFlags
Expand
NclConstants
Expand
NclTraceSource
Expand
NclUtilities
Expand
NestedMultipleAsyncResult
Expand
NestedSingleAsyncResult
Expand
Nesting
Expand
NetRes
Expand
NetworkAccess
Expand
NetworkCredential
Expand
OpenReadCompletedEventArgs
Expand
OpenWriteCompletedEventArgs
Expand
OSSOCK
Expand
PathList
Expand
PathListComparer
Expand
PipelineEntry
Expand
PipelineEntryFlags
Expand
PipelineInstruction
Expand
PooledStream
Expand
PrefixLookup
Expand
ProgressData
Expand
ProtocolViolationException
Expand
ProxyChain
Expand
ProxyEnumerator
Expand
ProxyRegBlob
Expand
ProxyScriptChain
Expand
Queue
Expand
ReadState
Expand
ReceiveState
Expand
RecognizedAttribute
Expand
RequestContext
Expand
RequestStage
Expand
ResolveAsyncResult
Expand
ResponseDescription
Expand
RfcChar
Expand
SafeCloseHandle
Expand
SafeCloseHandle
Expand
SafeCloseSocket
Expand
SafeCloseSocket
Expand
SafeCloseSocketAndEvent
Expand
SafeGlobalFree
Expand
SafeGlobalFree
Expand
SafeLocalFree
Expand
SafeLocalFree
Expand
SafeNetHandles
Expand
SafeNetHandlesSafeOverlappedFree
Expand
SafeOverlappedFree
Expand
SafeOverlappedFree
Expand
ScatterGatherBuffers
Expand
ScriptHost
Expand
Semaphore
Expand
ServicePoint
Expand
ServicePointManager
Expand
ShellExpression
Expand
ShExpTokens
Expand
SocketAddress
Expand
SocketConstructorFlags
Expand
SocketPermission
Expand
SocketPermissionAttribute
Expand
SplitWritesState
Expand
SpnDictionary
Expand
Stamp
Expand
State
Expand
StateFlags
Expand
StaticProxy
Expand
StatusLineValues
Expand
StreamChunkBytes
Expand
SyncMemoryStream
Expand
SyncStatus
Expand
SystemNetworkCredential
Expand
ThreadContext
Expand
ThreadKindFrame
Expand
ThreadKinds
Expand
TimeoutValidator
Expand
Timer
Expand
TimerNode
Expand
TimerQueue
Expand
TimerState
Expand
TimerThread
Expand
TimerThreadState
Expand
TransmitFileBuffers
Expand
TransportType
Expand
TriState
Expand
TunnelStateObject
Expand
UnsafeNclNativeMethods
Expand
UploadBitsState
Expand
UploadDataCompletedEventArgs
Expand
UploadFileCompletedEventArgs
Expand
UploadProgressChangedEventArgs
Expand
UploadStringCompletedEventArgs
Expand
UploadValuesCompletedEventArgs
Expand
ValidationHelper
Expand
WebClient
Expand
WebClientWriteStream
Expand
WebException
Expand
WebExceptionInternalStatus
Expand
WebExceptionMapping
Expand
WebExceptionStatus
Expand
WebHeaderCollection
Expand
WebHeaderCollectionType
Expand
WebParseError
Expand
WebParseErrorCode
Expand
WebParseErrorSection
Expand
WebPermission
Expand
WebPermissionAttribute
Expand
WebProxy
Expand
WebProxyData
Expand
WebProxyScriptHelper
Expand
WebProxyScriptHelper
Expand
WebProxyWrapper
Expand
WebProxyWrapperOpaque
Expand
WebRequest
Expand
WebRequestMethods
Expand
WebRequestPrefixElement
Expand
WebResponse
Expand
Win32
Expand
WriteBufferState
Expand
WriteHeadersCallbackState
Expand
WSABuffer
Expand
WSAData
Expand
WSAMsg
Expand
WSAPROTOCOL_INFO
Expand
WSAPROTOCOLCHAIN
Expand
System.Net.Sockets
Expand
System.Net.NetworkInformation
Expand
System.Net.ComImports
Expand
System.Net.Security
Expand
System.Net.Cache
Expand
System.Net.Configuration
Expand
System.Text.RegularExpressions
Expand
System.Tools
Expand
System.IO.Compression
Expand
System.IO.Ports
Expand
System.Security.AccessControl
Expand
System.Xml
Expand
System.Xml.XPath.DataBinding
Expand
System.Xml.Schema
Expand
System.Xml.Serialization
Expand
System.Xml.Serialization.Advanced
Expand
System.Xml.Serialization.Configuration
Expand
System.Xml.XPath
Expand
System.Xml.Xsl
Expand
System.Xml.Xsl.IlGen
Expand
System.Xml.Xsl.Qil
Expand
System.Xml.Xsl.Runtime
Expand
System.Xml.Xsl.XPath
Expand
System.Xml.Xsl.Xslt
Expand
System.Xml.Xsl.XsltOld
Expand
System.Xml.Xsl.XsltOld.Debugger
Expand
Microsoft.JScript
Expand
Microsoft.Vsa
Expand
Microsoft.JScript.Vsa
C#
VB.NET
//------------------------------------------------------------------------------
// <copyright file="_OSSOCK.cs" company="Microsoft">
//
// Copyright (c) 2006 Microsoft Corporation. All rights reserved.
//
// The use and distribution terms for this software are contained in the file
// named license.txt, which can be found in the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by the
// terms of this license.
//
// You must not remove this notice, or any other, from this software.
//
// </copyright>
//------------------------------------------------------------------------------
namespace
System.Net
{
using
System.Net.Sockets
;
using
System.Runtime.InteropServices
;
//
// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
//
[StructLayout(LayoutKind.Sequential)]
internal
struct
IPMulticastRequest
{
internal
int
MulticastAddress;
// IP multicast address of group
internal
int
InterfaceAddress;
// local IP address of interface
static
internal
readonly
int
Size = Marshal.SizeOf(
typeof
(
IPMulticastRequest
));
}
[StructLayout(LayoutKind.Sequential)]
internal
struct
Linger
{
internal
short
OnOff;
// option on/off
internal
short
Time;
// linger time
static
internal
readonly
int
Size = Marshal.SizeOf(
typeof
(
Linger
));
}
[StructLayout(LayoutKind.Sequential)]
internal
struct
WSABuffer
{
internal
int
Length;
// Length of Buffer
internal
IntPtr
Pointer;
// Pointer to Buffer
}
[StructLayout(LayoutKind.Sequential)]
internal
class
TransmitFileBuffers
{
internal
IntPtr
preBuffer;
// Pointer to Buffer
internal
int
preBufferLength;
// Length of Buffer
internal
IntPtr
postBuffer;
// Pointer to Buffer
internal
int
postBufferLength;
// Length of Buffer
}
[StructLayout(LayoutKind.Sequential)]
internal
struct
WSAData
{
internal
short
wVersion;
internal
short
wHighVersion;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)]
internal
string
szDescription;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)]
internal
string
szSystemStatus;
internal
short
iMaxSockets;
internal
short
iMaxUdpDg;
internal
IntPtr
lpVendorInfo;
}
// data structures and types needed for getaddrinfo calls.
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
unsafe
internal
struct
AddressInfo
{
internal
AddressInfoHints
ai_flags;
internal
AddressFamily
ai_family;
internal
SocketType
ai_socktype;
internal
ProtocolFamily
ai_protocol;
internal
int
ai_addrlen;
internal
sbyte
* ai_canonname;
// Ptr to the cannonical name - check for NULL
internal
byte
* ai_addr;
// Ptr to the sockaddr structure
internal
AddressInfo
* ai_next;
// Ptr to the next AddressInfo structure
}
[Flags()]
internal
enum
AddressInfoHints
{
AI_PASSIVE = 1,
/* Socket address will be used in bind() call */
AI_CANONNAME = 2,
/* Return canonical name in first ai_canonname */
AI_NUMERICHOST = 4
/* Nodename must be a numeric address string */
}
[Flags()]
internal
enum
NameInfoFlags
{
NI_NOFQDN = 1,
/* Only return nodename portion for local hosts */
NI_NUMERICHOST = 2,
/* Return numeric form of the host's address */
NI_NAMEREQD = 4,
/* Error if the host's name not in DNS */
NI_NUMERICSERV = 8,
/* Return numeric form of the service (port #) */
NI_DGRAM = 16
/* Service is a datagram service */
}
// Argument structure for IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP.
[StructLayout(LayoutKind.Sequential)]
internal
struct
IPv6MulticastRequest
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
internal
byte
[] MulticastAddress;
// IP address of group
internal
int
InterfaceIndex;
// local interface index
static
internal
readonly
int
Size = Marshal.SizeOf(
typeof
(
IPv6MulticastRequest
));
}
//
// used as last parameter to WSASocket call
//
[Flags()]
internal
enum
SocketConstructorFlags
{
WSA_FLAG_OVERLAPPED = 1,
WSA_FLAG_MULTIPOINT_C_ROOT = 2,
WSA_FLAG_MULTIPOINT_C_LEAF = 4,
WSA_FLAG_MULTIPOINT_D_ROOT = 8,
WSA_FLAG_MULTIPOINT_D_LEAF = 16
}
}
// namespace System.Net
Developer Fusion