Answer the question
In order to leave comments, you need to log in
Can php send information in chunks?
If a gray IP server sends a request to a white IP server, can the white IP server send a response indefinitely, thus creating a persistent tunneling connection?
Can php send information in chunks? (More details about buffering, please).
Main question.
All questions on the topic:
How to use PHP on a hosting with a "white" IP to make an http tunnel to connect to a server with a "gray" IP, which is behind NAT'om?
How to get http access to a server with a gray IP from the Internet by any means?
There is a technology of clustering. How to optimize it?
How to create a persistent tunneling connection using php?
Will NAS timeouts interfere with my tunneling?
Can php receive and immediately process part of a request without waiting for the request to finish receiving?
Can php send information in chunks?
Most recent discussion.
Answer the question
In order to leave comments, you need to log in
maybe but firewalls somewhere in the middle or the webserver itself on which php is running can interrupt the fun, often there is a timeout of 30 seconds.
to send data, use flush()
buffering is tricky because it can depend on both php and the webserver. very often, in order to send information in parts, I had to add garbage 4-8kb (for example, echo str_pad('', 8048, ' ') ). without this, it buffers and waits for more to accumulate, even flush does not help - it works on php as far as I understand, and there is also a web server (maybe you should dig into the buffering settings of the web server you are using).
in general, this is the last century, of course, use better nodejs or sockets
Maybe, but php is as good for it as a bouncy ball is for laying bricks.
If you need to make a unidirectional stream - use UDP and you will be happy.
At the expense of returning data in parts: habrahabr.ru/post/250343
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question