Sockets are blocking the main thread
socket_open seems to be blocking the main thread for 1 second if the remote server is offline.
Does socket send/receive block the thread also? Is there any way to avoid this? I'm deciding between using a TCP server with sockets or a web server with AmxxEasyHttp. The advantage with sockets is that the tcp server can talk back any time. With AmxxEasyHttp however, I need to do a periodical GET request to receive a list of commands from the web server. I also want to make the plugin compatible with AMX 1.8 if possible. Does anyone know when AMX 1.9 will come out of beta? |
Re: Sockets are blocking the main thread
Look into threaded sockets module or soclet_hz module.
|
| All times are GMT -4. The time now is 15:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.