solve socket problem