Stream_socket_xxxx and socket_xxx Differences in PHP

Source: Internet
Author: User
Read the manual, not too clear stream_socket_xxxx and socket_xxx have what connection

For example: Stream_socket_recvfrom and Socket_recvfrom are functionally the same except for different parameters

Is it possible to understand that one is another extension?

For example: Stream_socket_client and socket_create seem to be able to create socket resources, and the stream is a bit more powerful

Younger brother White hand, do not understand just want to ask.

PS: Suddenly see a fsocketopen, how the socket variant so many?

Reply content:

Read the manual, not too clear stream_socket_xxxx and socket_xxx have what connection

For example: Stream_socket_recvfrom and Socket_recvfrom are functionally the same except for different parameters

Is it possible to understand that one is another extension?

For example: Stream_socket_client and socket_create seem to be able to create socket resources, and the stream is a bit more powerful

Younger brother White hand, do not understand just want to ask.

PS: Suddenly see a fsocketopen, how the socket variant so many?

Stream_socket_xxxx is the encapsulation of some functions, such as sockets.
Supported protocols more
http://php.net/manual/zh/wrappers.php

Almost the content
Put an answer.
http://stackoverflow.com/questions/9760548/php-sockets-vs-streams/9783856#9783856
It is recommended to use the stream_* function anyway

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.