build array for send it with tcp


SUBMITTED BY: Thor2607

DATE: Sept. 29, 2016, 3:10 a.m.

FORMAT: C#

SIZE: 287 Bytes

HITS: 594

  1. public static byte[] sendBArray(byte[] buffer)
  2. {
  3. byte[] b = new Byte[buffer.Length + c];
  4. Buffer.BlockCopy(new int[] { buffer.Length }, 0, b, 0, c);
  5. Buffer.BlockCopy(buffer, 0, b, c, buffer.Length);
  6. return b;
  7. }

comments powered by Disqus