trusty-ut-ctrl: Allow stream mode
When using vsock in stream mode (or any other stream mode connection) message boundaries are not preserved, so the original messages can get both split and merged. The TEST_MESSAGE and TEST_TEXT messages don't have a length field which makes it imposible to support every possible message that can be sent over a channel that preserves message boundaries. Since the current message header types don't contain any printable character, we assume any of these characters in a message payload means that two messages got merged, so we split them back up. Additionally, if we receive a message that does not start with a valid message header, we assume it is a continuation of the previous message. Test: trusty-ut-ctrl -D VSOCK:2:1 com.android.libctest ^Z fg Bug: 298705967 Change-Id: I0e470a23664268f86e4defd824c47be3479c8f25
Loading
Please register or sign in to comment