Seems like you are talking about the WEB. Hosting a webserver on clients is not really smart. However, establishing a duplex socket connection allows the client to connect to a public server ip and the server can then talk to the client after this connection. The web is not session based, to get information you would have to use a connection scheme such as WebSockets or use polling to your webserver.
If you want more info about why hosting a webserver is not a good option on clients. Lookup: NAT, Firewall, STUN.