spinneret as a client, GETting to a remote server
max72
Posts: 1,155
I have used the multiport object and it works for the "get my IP" example. I'm trying to do the same to send data to a sql server using GET.
I found it worked a cvouple of times, the I started having problems and the server hangs waiting for the response (after the connection).
I tried to change port 2 and it worked for some time, so I guess there is a kind of port filtering or hangup.
I would like an opinion or a suggestion about this strange behaviour.
Thanks in advance,
Massimo
I found it worked a cvouple of times, the I started having problems and the server hangs waiting for the response (after the connection).
I tried to change port 2 and it worked for some time, so I guess there is a kind of port filtering or hangup.
I would like an opinion or a suggestion about this strange behaviour.
Thanks in advance,
Massimo
Comments
Make sure your out going request is using a different port than your server.
Lastly, post your source code.
Globalcache is set to 0.
I'm sending the GET request to port 80 of the server.
I tried to change the port2 number between 5000 and 8000 with strange results. Lastly I set it to 1024, and it worked all the night sending a get every 5 minutes without a hitch. I'll try again later to see if it is repeatable.
While I'm happy it works I cannot understand why....
Massimo
Next step will be to have permanent a client (or maybe more..).
The data is coming from a GSM module (as SMS) so the traffic is very small. Anyway I was able to successfully update more than 300 points at the moment.
Massimo
I have been looking at examples and am not getting how you create a dedicated client. I assume that to create less than 4 listeners, just choose which of the 4 will be set to listen.
Configure a socket with the remote server IP and port and leave it.
I setup the listeners when the HTTPServer initializes. It's just a repeat loop.