socket_accept(), socket_import_stream(), socket_addrinfo_connect(), socket_addrinfo_bind(), socket_create_listen(), socket_wsaprotocol_info_import() and socket_create() return Socket resources.
socket_addrinfo_lookup() returns an array of AddressInfo resources.