Socket::ProtocolType Property
.NET Framework (current version)
Gets the protocol type of the Socket.
Assembly: System (in System.dll)
The following code example displays the AddressFamily, SocketType, and ProtocolType to the console.
Socket^ s = gcnew Socket( lep->Address->AddressFamily,SocketType::Stream,ProtocolType::Tcp ); //Uses the AddressFamily, SocketType, and ProtocolType properties. Console::Write( "I just set the following properties of socket: \n" ); Console::Write( "Address Family = {0}", s->AddressFamily.ToString() ); Console::Write( "\nSocketType = {0}", s->SocketType.ToString() ); Console::WriteLine( "\nProtocolType = {0}", s->ProtocolType.ToString() );
Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Show: