With TCP, there is absolutely no difference where how sending data is directed: from client to server or from server to client. The connection is always established by the initiative of the client, which is connected to the listening server, and this is the only reason why a client is a client and a server is a server. After connection, client and server part can exchange data in both directions, only the order of these operations should be matching, which is established by one or another
application-layer protocol you use over TCP (which is the
transport-level protocol:
http://en.wikipedia.org/wiki/Application_layer[
^],
http://en.wikipedia.org/wiki/Transport_layer[
^],
http://en.wikipedia.org/wiki/Transmission_Control_Protocol[
^].
I want to emphasize that such application-layer protocol always exist, even if you think you don't have any; in this case, such protocol still exist, implicitly defined by your code. Naturally, it's more productive to admit its existence and define it more explicitly. Now, some may think that such protocol works as follows: the client connects, sends one or more requests; and the server side responds to each request. Even though this is the case in many cases, like HTML, this is absolutely not a law. Your protocol can be anything else.
Besides, you can have two different TCP sessions between the same client and the same service. A server can listen on two ports, and each client can connect and establish two separate connections. For one pair of sockets (client and server sockets), the protocol can allow a client to send requests and the server should respond; on second on, the server always requests and the client responds. At the first client request, the client can pass the server some kind of identification, so the server could create an association between two client sockets, as the sockets "of the same logical client". This is just a very simple example of the operations. In reality, you will be limited only by two things 1) TCP protocol, 2) your fantasy.
For some more ideas, please take a look at my past answers (related to TCP but unrelated to Java and Android):
an amateur question in socket programming[
^],
Multple clients from same port Number[
^].
Good luck,
—SA