[socket] Vendored socketful, modified to use resource api