new func in socket