You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
607 B
27 lines
607 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace STcpHelper.Packet
|
|
{
|
|
static class SBufferHelper
|
|
{
|
|
public static byte[] GetBuffer(int size, params byte[][] args)
|
|
{
|
|
byte[] bytes = new byte[size];
|
|
int cursor = 0;
|
|
|
|
for (int i = 0; i < args.Length; i++)
|
|
{
|
|
byte[] data = args[i];
|
|
|
|
Array.Copy(data, 0, bytes, cursor, data.Length);
|
|
cursor += data.Length;
|
|
}
|
|
|
|
return bytes;
|
|
}
|
|
}
|
|
}
|
|
|