Refactor network test, to send message at server and client connection