Hi
I want to communicate with a servlet (which will handle the leaderboard of my app), and as such I first tested a really simple servlet that display a string when called.
The servlet is working fine when used from a browser, but AppGameKit seems to have some problem accessing it.
I used the basic code given with the documentation to try to connect to my servlet with mixed success:
+ from windows, I can connect to, say "google.com", but I cannot connect to my servlet located on 'localhost:8080' (remember: i can access it correctly from any browser)
+ from android, if I change 'localhost' to my actual ip, it works.
+ from windows, changing 'localhost' to '127.0.0.1' or my actual ip, does not work.
+ from windows, I also tried to access my servlet from a java application doing roughly what AppGameKit should do, and it works fine.
By not working, I mean that the response is a null string, and NO sign of connection is shown in the tomcat logs (Tomcat is the application server I use to run the servlet).
I am using the Tier 1 language.
For reference purposes, I will post my code, but it is really basic, so I don't think the problem lies here ...
SetWindowTitle( "test_servlet" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
http = CreateHTTPConnection()
SetHTTPHost( http, "192.168.1.88:8080", 0 )
SendHTTPRequestAsync( http, "/WebappTest1/java" )
while GetHTTPResponseReady(http) = 0
Print( "Connecting..." )
Sync()
endwhile
response as string
response = GetHTTPResponse(http)
CloseHTTPConnection( http )
DeleteHTTPConnection( http )
do
Print( "'" + response + "'" )
Print( ScreenFPS() )
Sync()
loop
Any idea ?