Socket and tcp protocol