首次提交
This commit is contained in:
31
Assets/Scripts/Common/Net/Hotfix/System/SessionHelper.cs
Normal file
31
Assets/Scripts/Common/Net/Hotfix/System/SessionHelper.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
// using System;
|
||||
// using Fantasy;
|
||||
// using Fantasy.Network;
|
||||
// using NBC;
|
||||
//
|
||||
// namespace NBF
|
||||
// {
|
||||
// public static class SessionHelper
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// 创建一个网络会话
|
||||
// /// </summary>
|
||||
// /// <param name="scene"></param>
|
||||
// /// <param name="address">远程服务器地址</param>
|
||||
// /// <param name="onConnectComplete">当连接成功执行的委托,可为空</param>
|
||||
// /// <param name="onConnectFail">当连接超时或失败执行的委托,可为空</param>
|
||||
// /// <param name="onConnectDisconnect">当连接断开执行的委托,可为空</param>
|
||||
// /// <returns></returns>
|
||||
// public static Session CreateSession(Scene scene, string address, Action onConnectComplete, Action onConnectFail,
|
||||
// Action onConnectDisconnect)
|
||||
// {
|
||||
// return scene.Connect(
|
||||
// address,
|
||||
// NetworkProtocolType.KCP,
|
||||
// onConnectComplete,
|
||||
// onConnectFail,
|
||||
// onConnectDisconnect,
|
||||
// false, 5000);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user