I am sending two byte arrays in the same buffer to be sent to a socket i don't know how to separate them when received
clientSocket.SendBufferSize = blindedVote.getBytes().Length + sBEVote.Length;
byte[] outStream = new byte[clientSocket.SendBufferSize];
blindedVote.getBytes().CopyTo(outStream, 0);
sBEVote.CopyTo(outStream, blindedVote.getBytes().Length);
serverStream.Write(outStream, 0, outStream.Length);
// int size = clientSocket.SendBufferSize;
serverStream.Flush();
when received how can i separate each array of bytes?
thanks
longfor instance), then read that many bytes from the stream. That's the general idea. - default