socket initialize and listener