Improve connection between server e client

This commit improve the file transfer between server and client

Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com>