byte[] encodedAppRequest = appEncoder.encode( appRequest );
// Build private message bytes
PrivateMessage privateMessage = message.getPrivateMessage();
PrivateMessageEncoder privateEncoder = new PrivateMessageEncoder();
byte[] privateBytes = privateEncoder.encode( privateMessage );
short messageLength = ( short ) ( HEADER_LENGTH + encodedAppRequest.length + privateBytes.length );
short protocolVersion = 1;