초기커밋
This commit is contained in:
41
ServerBase/Helper/ProudNetHelper.cs
Normal file
41
ServerBase/Helper/ProudNetHelper.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using Google.Protobuf;
|
||||
using Nettention.Proud;
|
||||
|
||||
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
using SESSION_ID = System.Int32;
|
||||
|
||||
|
||||
namespace ServerBase;
|
||||
|
||||
|
||||
//=============================================================================================
|
||||
// ProudNet 관련 각종 지원 함수
|
||||
//
|
||||
// author : kangms
|
||||
//
|
||||
//=============================================================================================
|
||||
|
||||
public static class ProudNetHelper
|
||||
{
|
||||
public static void convertP2PGroupToByteArray(ByteArray byArray, P2PGroupType p2PGroupType)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
using (var output = new CodedOutputStream(stream))
|
||||
{
|
||||
p2PGroupType.WriteTo(output);
|
||||
}
|
||||
byArray.AddRange(stream.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user