organized the link between server and local client.
created server connection async events