Implements the two-way communication of client and servers.