신규 프로토콜 생성

This commit is contained in:
김민서 2023-12-08 13:33:20 +09:00
parent 66ca07176a
commit 1a315bdc97
1 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,45 @@
using Server.System;
using Newtonsoft.Json;
namespace Server.Service
{
public class ChangeDeck : AbstractService
{
private ChangeDeckReq req;
public override string Process()
{
return makeResp();
}
public override Protocol ProtocolValue() => Protocol.Test;
public override Req Requst(string json)
{
req = JsonConvert.DeserializeObject<ChangeDeckReq>(json);
return req;
}
private string makeResp()
{
ChangeDeckResp resp = new ChangeDeckResp();
resp.status = 200;
return resp.ToJson();
}
//1. 해당 데이터가 db에 있는지 확인
//2. 존재하는 데이터라면 신규 데이터로 업데이트
}
public class ChangeDeckReq : Req
{
public override bool IsReceivedAllField()
{
return true;
}
}
public class ChangeDeckResp : Resp
{
}
}