You are not logged in.
I wrote a client / server and the server is a service.
Then I wrote a client that reads data from the server and processes them.
Now my requirement is if a client can communicate with another client directly or must pass through the server, if server communicate via a server how do I send a message to a particular client?
Sorry for the turn of phrase, but basically I do make a statement to a remote client. how can I do?
Client -> Server -> Client
thanks
Offline
The underlying architecture is STATELESS.
See the documentation about it.
So, in a stateless world, you should have several clients on the same server, with no expectation of the particular state of data.
If you want clients to be "synchronized", you should better do it with a state-less approach.
This can be done easily with the "Refreshing" methods of the framework, or with a dedicated service.
Of course, you can create a server instance on the client side, and allow direct connect from other clients, by-passing the main server.
mORMot allows you to create as many servers and clients as possible in the same process.
But you will need to open the port or register the HTTP binding with administrator rights on the client, and allow firewall, proxy and port forwarding on the network. Not an easy task for the customer!
So my advice in this case is to stick to the Stateless approach, and use the main server as the main synchronization point of all clients.
Trying to multiply the "servers" on the network is possible, but potentially much difficult to work with.
Offline