implement socket load function.
#27 fixed, #28 fixed, #f29 ixed