add some function

create socket function