support a node is server and client at the same time