Coded till sending message in client