@ -84,9 +86,9 @@ public class TCPClientView : MonoBehaviour,IController,ICanSendEvent
@@ -84,9 +86,9 @@ public class TCPClientView : MonoBehaviour,IController,ICanSendEvent
{
returnTCPMangerArchitecture.Interface;
}
}
publicclassLinkSuccessResponse:AbstractResponse
{
}
publicclassLinkSuccessResponse:AbstractResponse
{
publicstringcode;
publicstringdata;
publicstringmsg;
@ -95,9 +97,9 @@ public class LinkSuccessResponse : AbstractResponse
@@ -95,9 +97,9 @@ public class LinkSuccessResponse : AbstractResponse
this.data="";
this.msg="";
}
}
}
publicclassLinkTCPRequest:IRequest{
publicclassLinkTCPRequest:IRequest{
publicstringid;
publicinttype;
publicLinkTCPRequest(intid){
@ -108,5 +110,6 @@ public class LinkTCPRequest :IRequest{
@@ -108,5 +110,6 @@ public class LinkTCPRequest :IRequest{
@ -87,14 +88,14 @@ public class ExcuteResponseCommand<TResponse> : AbstractCommand where TResponse
@@ -87,14 +88,14 @@ public class ExcuteResponseCommand<TResponse> : AbstractCommand where TResponse
@ -108,12 +109,12 @@ public class SendRequestCommand<TRequest> : AbstractCommand where TRequest : IRe
@@ -108,12 +109,12 @@ public class SendRequestCommand<TRequest> : AbstractCommand where TRequest : IRe
{
this.request=request;
}
}
#endregion
}
#endregion
#region interface
publicinterfaceIResponse
{
#region interface
publicinterfaceIResponse
{
stringtoJson();
/// <summary>
/// 尝试填充数据,如果json不合法,则返回false,忽略该条数据响应
@ -122,21 +123,21 @@ public interface IResponse
@@ -122,21 +123,21 @@ public interface IResponse
/// <returns></returns>
booltrySetData(stringjson);
stringgetException();
}
}
publicinterfaceIRequest
{
publicinterfaceIRequest
{
stringtoJson();
}
#endregion
}
#endregion
#region AbstractClass
/// <summary>
/// 使用抽象类时,必须满足可序列化
/// </summary>
[Serializable]
publicabstractclassAbstractResponse:IResponse
{
#region AbstractClass
/// <summary>
/// 使用抽象类时,必须满足可序列化
/// </summary>
[Serializable]
publicabstractclassAbstractResponse:IResponse
{
privatestringexceptionMsg;
publicvirtualstringtoJson()
{
@ -159,30 +160,31 @@ public abstract class AbstractResponse : IResponse
@@ -159,30 +160,31 @@ public abstract class AbstractResponse : IResponse