usocket with changes for mocl