This content has been marked as final. Show 2 replies
mathiii wrote:The one on the left should be the server.
I have two Java applications which need to send each other messages through Socketchannels (I use the NIO library).
I can't decide which should be the server and which the client (they both know each other's ip).
Seriously though, you haven't told us anything about either one of them, so how can anybody give you any concrete suggestions? All I can say is that as a general rule, if A is conceptually providing a service, and the normal interaction is that B asks A for something and then sends back a response, A would be considered the server. If they're conceptually peers, and communication can arbitrarily originate at either end, and there's no clear "service provider," then, no, it doesn't matter.