socket initialization