add socket support

Signed-off-by: evanq <cppmain@gmail.com>