implement tcpsocket communication, doesn't work