TCP communication update.Not tested yet.(TODO:TEST!!!)