Implementando socket server echo c style