本文整理汇总了VB.NET中System.Net.Sockets.NetworkStream.NetworkStream构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET NetworkStream构造函数的具体用法?VB.NET NetworkStream怎么用?VB.NET NetworkStream使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Net.Sockets.NetworkStream
的用法示例。
在下文中一共展示了NetworkStream构造函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: NetworkStream
' Examples for constructors that do not specify file permission.
' Create the NetworkStream for communicating with the remote host.
Dim myNetworkStream As NetworkStream
If networkStreamOwnsSocket Then
myNetworkStream = New NetworkStream(mySocket, True)
Else
myNetworkStream = New NetworkStream(mySocket)
End If
示例2: NetworkStream
' Example for creating a NetworkStreams
mySocket.Connect(myIpEndPoint)
' Create the NetworkStream for communicating with the remote host.
Dim myNetworkStream As NetworkStream
If networkStreamOwnsSocket Then
myNetworkStream = New NetworkStream(mySocket, FileAccess.ReadWrite, True)
Else
myNetworkStream = New NetworkStream(mySocket, FileAccess.ReadWrite)
End If