socket base code updated