NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Framework/Net/NetDef.cs

39 lines
747 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////
//
// 文件Assets\XSF\Net\NetDef.cs
// 作者Xoen Xie
// 时间2023/07/18
// 描述:网络定义
// 说明:
//
//////////////////////////////////////////////////////////////////////////
using System;
namespace Framework
{
public enum NetError
{
None = 0,
Connect,
Recv,
Send,
Package,
}
public interface INetHandler
{
void OnConnected();
void OnRecv(byte[] data);
void OnError(NetError nErrorCode);
}
public class NetPackageParseException : Exception
{
public override string Message { get { return "Net ReceiveData catch Exception"; } }
}
}