Hi, I need to create an application(using 2 emulators) in which: Each 
emulator serves as a server and a client.

Server starts as a service in background. On request by the client, I have 
to transfer the contents of a JSON file from 1 emulator's server to other 
emulator's client.. Can you please guide me in the usage of how to use port 
numbers(as the IP addresses of both instances of the emulator is the same)?

Thank you!

On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
>
> Hi,
>
> Change the port number in your request -
>
> PORT = 8765
>
> not 8080
>
> And yes you can write your own http server simply by using a server 
> socket. 
> http://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html
>
> Regards 
>
>
> On Thursday, October 4, 2012 3:57:58 PM UTC+10, Archana wrote:
>>
>> Hi, I want to develop HTTP server in Android. I used the link 
>> https://gist.github.com/1893396#gistcomment-582451 NanoHTTPD. But when I 
>> open the page http://10.0.2.15:8080, I am getting WebPage not found. In 
>> the logs, I am getting 
>>
>> 10-04 05:55:39.106: E/Tab(499): onReceivedError -6 http://10.0.2.15:8697/The 
>> connection to the server was unsuccessful.
>>
>> Can anyone please tell me what the error is about? Or is there any other 
>> way to implement a HTTP server in Android?
>>
>> Thanks in advance!
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to