add socket support

add socket support