本文整理汇总了C#中Joint.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Joint.Start方法的具体用法?C# Joint.Start怎么用?C# Joint.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Joint
的用法示例。
在下文中一共展示了Joint.Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadDataAsync
//.........这里部分代码省略.........
case SIGNAL_CONNECT_PROXY_TUNNEL:
{
ChannelStream remoteChannel1 = null;
Stream remoteChannel2 = null;
try
{
//get remote peer ep
IPEndPoint tunnelToPeerEP = ConvertToIP(channelName.ID);
//add first stream into list
remoteChannel1 = new ChannelStream(this, channelName, ChannelType.ProxyTunnel);
lock (_proxyTunnelChannels)
{
_proxyTunnelChannels.Add(channelName, remoteChannel1);
}
//get remote channel service
Connection remotePeerConnection = _connectionManager.GetExistingConnection(tunnelToPeerEP);
//get remote stream for virtual connection
remoteChannel2 = remotePeerConnection.RequestVirtualConnectionChannel(_remotePeerEP);
//join current and remote stream
Joint joint = new Joint(remoteChannel1, remoteChannel2);
joint.Disposed += joint_Disposed;
lock (_tunnelJointList)
{
_tunnelJointList.Add(joint);
}
joint.Start();
Debug.Write("Connection.ReadDataAsync", "SIGNAL_CONNECT_PROXY_TUNNEL; tunnel to peerIP: " + tunnelToPeerEP.ToString());
}
catch
{
if (remoteChannel1 != null)
remoteChannel1.Dispose();
if (remoteChannel2 != null)
remoteChannel2.Dispose();
}
}
break;
case SIGNAL_DISCONNECT_PROXY_TUNNEL:
try
{
lock (_proxyTunnelChannels)
{
_proxyTunnelChannels[channelName].Dispose();
}
Debug.Write("Connection.ReadDataAsync", "SIGNAL_DISCONNECT_PROXY_TUNNEL; channel: " + channelName.ToString());
}
catch
{ }
break;
case SIGNAL_CONNECT_VIRTUAL_CONNECTION:
{
ChannelStream channel = null;