프로토콜 수정및 일부 파일 인코딩 변경
This commit is contained in:
parent
22da510844
commit
573f246e7a
|
@ -3,25 +3,25 @@ using Newtonsoft.Json;
|
|||
|
||||
namespace Server.Service
|
||||
{
|
||||
public class Test : AbstractService
|
||||
public class AddUser : AbstractService
|
||||
{
|
||||
private TestReq req;
|
||||
private AddUserReq req;
|
||||
public override string Process()
|
||||
{
|
||||
return makeResp();
|
||||
}
|
||||
|
||||
public override Protocol ProtocolValue() => Protocol.Test;
|
||||
public override Protocol ProtocolValue() => Protocol.AddUser;
|
||||
|
||||
public override Req Requst(string json)
|
||||
{
|
||||
req = JsonConvert.DeserializeObject<TestReq>(json);
|
||||
req = JsonConvert.DeserializeObject<AddUserReq>(json);
|
||||
return req;
|
||||
}
|
||||
|
||||
private string makeResp()
|
||||
{
|
||||
TestResp resp = new TestResp();
|
||||
AddUserResp resp = new AddUserResp();
|
||||
resp.status = 200;
|
||||
return resp.ToJson();
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Server.Service
|
|||
|
||||
}
|
||||
|
||||
public class TestReq : Req
|
||||
public class AddUserReq : Req
|
||||
{
|
||||
public override bool IsReceivedAllField()
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ namespace Server.Service
|
|||
}
|
||||
}
|
||||
|
||||
public class TestResp : Resp
|
||||
public class AddUserResp : Resp
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
public enum Protocol
|
||||
{
|
||||
Test = 0,
|
||||
AddUser = 1,
|
||||
}
|
||||
|
||||
public enum Error
|
||||
|
|
Loading…
Reference in New Issue