using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using SuperSocket;
|
using SuperSocket.Channel;
|
using SuperSocket.ProtoBase;
|
using SuperSocket.Server;
|
|
namespace IStation.Server
|
{
|
/// <summary>
|
/// Session会话
|
/// </summary>
|
internal class MySession : AppSession
|
{
|
protected override ValueTask OnSessionConnectedAsync()
|
{
|
LogHelper.Info($"设备:{this.RemoteEndPoint},连接成功!");
|
return base.OnSessionConnectedAsync();
|
}
|
|
protected override ValueTask OnSessionClosedAsync(CloseEventArgs e)
|
{
|
LogHelper.Info($"设备:{this.RemoteEndPoint},Socket连接关闭,关闭原因:{e.Reason}");
|
return base.OnSessionClosedAsync(e);
|
}
|
|
|
|
|
}
|
}
|