Sending large packets using php using socket_write

前端 未结 2 461
盖世英雄少女心
盖世英雄少女心 2021-01-16 14:48

I am trying to encode an image to base64 encoding and send it to a C++ server I am creating. I am using PHP to do that.

Therefore, the PHP code is the client and the

2条回答
  •  不要未来只要你来
    2021-01-16 15:14

    You need to set the socket send buffer to be at least as large as the largest UDP datagram you are sending.

    Don't ask me how to do that in PHP but at the Sockets API level it is setsockopt() with the SO_SNDBUF option.

提交回复
热议问题