Rename closebyserver to disconnect
Implement reply by server and add test case