modify socketclient so it can repeat send or only once