Implemented send to server for each command

Signed-off-by: Mihaela Martinas <martinas.mihaela21@gmail.com>