use socket to send and receive msg. only fit for windows