This is relatively straightforward when each client of a (potential) inbound gateway sends one message and waits for its response. It gets a little more tricky if a client multiplexes many messages over its connection. In this arena, we'd need a correlation id of some kind in the wire protocol so the client can associate a response with its corresponding request.
This is not so big an issue if the "other end" of the connection is a spring-integration outbound gateway because SI can use whatever wire protocol it likes. It is more difficult, though, for interop with non spring-integration clients. We may need something more robust than the current channel adapter pluggable wire protocol for tcp to handle more sophisticated wire protocols that include correlation data.
I see several options/phases; what can get done and when will depend on need and resource availability.
1. Inbound gateway that does not support multiplexed requests per connection.
+ blocking outbound gateway that single threads requests/responses over its connection.
2. Outbound/inbound gateways that support multiplexed requests over each connection, using a fixed wire protocol (albeit extensible via the current simple pluggable mechanism).
3. Build on 2 with a more sophisticated wire protocol pluggability.