mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
|
|
using Serein.Library.Attributes;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Net.WebSockets;
|
|||
|
|
using System.Runtime.InteropServices;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace Serein.Library.Network.WebSocketCommunication
|
|||
|
|
{
|
|||
|
|
public interface ISocketControlBase
|
|||
|
|
{
|
|||
|
|
Guid HandleGuid { get; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
//[AutoRegister(RegisterSequence.FlowLoading)]
|
|||
|
|
//[AutoSocketModule(JsonThemeField = "theme", JsonDataField = "data")]
|
|||
|
|
//public class UserService : ISocketControlBase
|
|||
|
|
//{
|
|||
|
|
// public Guid HandleGuid { get; } = new Guid();
|
|||
|
|
|
|||
|
|
// // Action<string> 类型是特殊的,会用一个委托代替,这个委托可以将文本信息发送到客户端
|
|||
|
|
// // Action<object> 类型是特殊的,会用一个委托代替,这个委托可以将对象转成json发送到客户端
|
|||
|
|
|
|||
|
|
// [AutoSocketHandle]
|
|||
|
|
// public void AddUser(User user,Action<string> Recover)
|
|||
|
|
// {
|
|||
|
|
// Console.WriteLine(user.ToString());
|
|||
|
|
// Recover("ok");
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
// [AutoSocketHandle(ThemeValue = "Remote")]
|
|||
|
|
// public void DeleteUser(User user, Action<string> Recover)
|
|||
|
|
// {
|
|||
|
|
// Console.WriteLine(user.ToString());
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
//}
|
|||
|
|
|
|||
|
|
}
|