No, a TCP socket is a stream of bytes: the bytes will be received in the order they are sent.
There are ways of achieving what you want.
If the sender and the receiver are both in the same machine, then you can use
IPC:Message Queues (#include <sys/msg.h>
) that supports message types/priorites.
You can also create a wrapper that reads all messages that have been received and then returns the message with the highest priority. (Note that this doesn't guarantee that message 2 will be processed before message 1, it only guarantees that message 2 will be processed before message 1 if it arrives before message 1 has been processed.)
Regardless, one thing that you need is a protocol. Right now, the receiver has no idea where one message ends and the next message starts. Remember that the notion of IP packages doesn't exist at the TCP level; the socket delivers a stream of bytes.
There is a mechanism in sockets called Out-of-Band data (OOB) that allows the transfer of data beside the normal stream. I've never used it myself, but I'm sure you can find examples on the internet.