Managed to fully send and recieve message from serever. Need to get
thread to work