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; } } }