title: Multiple Object Streams Over a Single Socket
body: <p>I am writing a program that requires large data like images (and eventually maybe audio streams or something, though that isn't an immediate goal), as well as small instructions to be send Host -> Client. Currently, I can write this as a plain TCP client-server application. However, this does mean that whenever an image is being sent, no other data will be being transferred, including fairly important small instructions which could be being sent very quickly. I could fix this by creating multiple sockets between the server and each client, but I would really rather keep things to one socket (and thus one port being used). Is there a protocol or something that I can use to send multiple streams of data concurrently (or at least somehow interweaved maybe?)? Any suggestions would be appreciated.</p>