Hi,
I'm having a problem with a neko.net.ThreadRemotingServer opening from
time to time HttpConnections to make some calls on a remote PHP server.
The issue is that, for some of these calls, the PHP server needs to
connect though a php_net_Socket to the ThreadRemotingServer within the
processing of a http request from the ThreadRemotingServer (ouch :)!).
The problem is that when it tries to do so, the connections from the PHP
server to the neko server aren't opened until the initial http
connection from the neko server to the PHP one is closed. And the
initial http request from neko to the PHP server won't be responded
until the PHP server can process completely the request (and thus make
these calls to the neko server). What I get is that the http connection
from the neko server times out as the connections from the PHP server to
the neko server can't be opened.
Well, I hope I was clear enough :)... The workarounds I've found are :
- on the neko side, to open the http connections and make the calls in
a new thread : neko.vm.Thread.create(function() {
conn.MyClass.myMethod.call([arg0,arg1]); });
The problem of this workaround is that I can't get the return value of
the http call to the PHP server in my original ThreadRemotingServer thread.
- or to create another ThreadRemotingServer just to handle these calls
from the PHP server (but it's quite an resource expensive solution just
for that, isn't it ?).
Is there any other way which would allow me not to create a second
ThreadRemotingServer but be able to get the return value of my http
calls to the PHP server ?
Thanks in advance !
--
Thomas Fétiveau
Développeur Indépendant
Mobile : +33 623 110 922
Tél : +33 297 667 674
web : http://www.tofee.fr/
skype : thomas.fetiveau.tech
--
Neko : One VM to run them all
(http://nekovm.org)