reactphp / socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.

Home Page:https://reactphp.org/socket/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client and Server at same time

majidnow opened this issue · comments

Hi
Note: my problem is't library issue, it's work just fine.
I'm trying to create one loop as a server( web socket for a web application) and another as a client(get data from a service using by a tcp server). the received data by client will send to web application after some processing things through server (web socket).
When I ran loop (even inside a thread) after that I can't run second one(first one block running procedure).
How can I solve this?

There can only be one event loop. So if you have two one will always block another, instead let both client and server use the same loop

Thanks for help. problem solved.

I'll assume this is resolved and will close this for now, please feel free to report back otherwise 👍