As I said, you can use to channels, one for commands and one for data. Each command can have a unique ID generated on the server. The corresponding data will have the same ID. In order to do this you have to implements some protocol kind of protocol. Read a document like this
RFC 959 (rfc959) - File Transfer Protocol to understand hot things are done usually.