start socket functions