Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahmadt's avatar

How to do https Bidirectional communication

Hello

I'm building a web application using lumen, and I have a client (I don't control it) that will connect to my web application (https) and start sending data and receiving data from my application based on the data that sent, is it possible to do this with lumen/PHP? any suggestion on the architecture?

Thanks

0 likes
4 replies
click's avatar

HTTP is bidirectional. A regular form post to your web application is bidirectional: the web browser sends a request with form data, you (the web server) sends a response back.

Maybe I am missing something but I don't see any challenge here.

  1. Client sends a request
  2. You (web application) receives the request
  3. You (web application) processes the request (whatever it should do)
  4. You (web application) sends a response back
  5. Client receives the response.
  6. Everybody happy
ahmadt's avatar

Hi @click

I think I didn't describe my issue

Here what I want:

  • Client sends a request 1
  • You (web application) receives the request 1
  • You (web application) processes the request 1 (whatever it should do)
  • You (web application) sends a response back
  • Client receives the response 1.
  • Client sends a request 2
  • You (web application) receives the request 2
  • You (web application) processes the request 2 (whatever it should do)
  • You (web application) sends a response back
  • Client receives the response 2.
  • .......
  • Client (or web application) decided to close the connection
  • Everybody happy
Snapey's avatar

Yep, thats the way the web works. Its called client-server communication.

Now, what's your question?

click's avatar

@ahmadt what you explained is exactly the same what I listed only repeated a few times... that is exactly how the web works.

Can you be more clear on what you want to do?

Please or to participate in this conversation.