changed all socket calls to og_socket and og_connect