本文整理匯總了VB.NET中System.Net.Sockets.UdpClient.Client屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET UdpClient.Client屬性的具體用法?VB.NET UdpClient.Client怎麽用?VB.NET UdpClient.Client使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Net.Sockets.UdpClient
的用法示例。
在下文中一共展示了UdpClient.Client屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: MyUdpClientDerivedClass
' This derived class demonstrates the use of three protected methods belonging to the UdpClient class.
Public Class MyUdpClientDerivedClass
Inherits UdpClient
Public Sub New()
End Sub
Public Sub UsingProtectedMethods()
'Uses the protected Active property belonging to the UdpClient base class to determine if a connection is established.
If Me.Active Then
' Calls the protected Client property belonging to the UdpClient base class.
Dim s As Socket = Me.Client
'Uses the Socket returned by Client to set an option that is not available using UdpClient.
s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1)
End If
End Sub
End Class