??????????linux??win???е????????????
???????????? ???????[ 2014/10/27 14:40:12 ] ????????Linux ????? ??????
????????????????????????????????д????????????????????????????鷳??????.??????EC??????????????????????????????linux??win???????е???????????.??????????????????mono??Щ???????????.??????????EC???????????????????????????????????????????????????.
??????????????????????????????????????Э?飬??EC??????????????Э?鸚?????????????????????????????????(EC?????????л??????????????protobuf??msgpack).
???????????
??????????????????????????????????????????????:
[MessageID(0x0001)]
[ProtoContract]
public class Login
{
[ProtoMember(1)]
public string Name { get; set; }
[ProtoMember(2)]
public string From { get; set; }
}
[MessageID(0x0003)]
[ProtoContract]
public class Signout
{
[ProtoMember(1)]
public string Name { get; set; }
[ProtoMember(2)]
public string From { get; set; }
}
[MessageID(0x0002)]
[ProtoContract]
public class Say
{
[ProtoMember(1)]
public string Content { get; set; }
[ProtoMember(3)]
public string From { get; set; }
[ProtoMember(2)]
public string Name { get; set; }
}
?????????
??????????????????EC???????????????????????????????????????飬????????д????????????????????????????.
[EC.Controller]
public class Program
{
static void Main(string[] args)
{
EC.ECServer.Open();
System.Threading.Thread.Sleep(-1);
}
public void OnLogin(EC.ISession session?? Chat.Login e)
{
session.Channel.Name = e.Name;
e.From = session.Channel.EndPoint.ToString();
foreach (Beetle.Express.IChannel other in session.Application.Server.GetOnlines())
{
if (other != session.Channel)
session.Application.Server.Send(e?? other);
}
}
public void OnSay(EC.ISession session?? Chat.Say e)
{
e.Name = session.Channel.Name;
e.From = session.Channel.EndPoint.ToString();
foreach (Beetle.Express.IChannel other in session.Application.Server.GetOnlines())
{
if (other != session.Channel)
session.Application.Server.Send(e?? other);
}
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11