How to connect two emulators with TCP?

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

How to connect two emulators with TCP?

Postby zjsst1214 » Sun Jun 15, 2008 5:14 pm

Hi
I try to connect two emulators use TCP,but i don't know how to do,who can help me?

Thanks!
纵马天涯
zjsst1214
Freshman
Freshman
 
Posts: 7
Joined: Fri Jun 13, 2008 7:42 am

Top

connect 2 emulator

Postby smalltalk » Tue Jul 01, 2008 1:52 pm

hi.
I had done successfully (connect 2 emulator together).
Very simple.
first. you build a server (with C#,VB.net, J#, Java...)
second: you build android app on emulator(the first emulator) to connect to this server(remember to turn on server first)
third: from server you connect to emulator (the second emulator) to send data of emulator 1.
ok. that's all. very simple.
smalltalk
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 12, 2008 3:34 pm

Postby zjsst1214 » Wed Jul 02, 2008 11:48 am

Hi smalltalk:
Thanks for your reply.
I know this method.
I means don't build the server in pc,but connect 2 emulators together direct.

This is my trial:
First i try tcp:start one tcp server(5555 port) in one emulator,i find the server listened at 0.0.0.0,But this address does mean nothing to the remote computer

Than i try udp:start udp server(8888 port) in one emulator,i find the server listened at 127.0.0.1,this address does mean nothing to the remote computer too.

So i can't build a server in android emulator,only can build the server in my computor,but this is not what i want.
Attachments
udp.PNG
udp.PNG (13.55 KiB) Viewed 578 times
纵马天涯
zjsst1214
Freshman
Freshman
 
Posts: 7
Joined: Fri Jun 13, 2008 7:42 am

Postby smalltalk » Thu Jul 10, 2008 5:59 pm

Hi.
If i don't misunderstand, u r trying to build peer to peer model (P2P). So u can try infrad... or bluetooth.
As for me, TCP Server is not real on mobilephone.
PS: If u can connect directly by bluetooth or something like that, please post code for me. :D
smalltalk
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 12, 2008 3:34 pm

Infrared peer to peer

Postby acton » Mon Sep 15, 2008 8:45 pm

Peer-to-peer phones using infrared makes more sense when you are trying to share multimedia files like songs, videos or music videos. They are at least 4Mb and the new IrSimple standard from IrDA is at least 4Mbps - zips the song in less than 2 sec (incl link setup). 16Mbps is already available and IrDA is working on 1Gbps!!

Has anyone tried to build the IrSimple stack in Android yet?
acton
Freshman
Freshman
 
Posts: 5
Joined: Mon Sep 15, 2008 8:27 pm
Location: Silicon Valley

Postby cgreen » Tue Sep 16, 2008 10:51 am

pls, don't compare beloved TCP/IP Stack with any infrared technology. :P


i've seen a blog on the net, where someone happen to successfully deploys a tcp server in the android emulator. maybe google for it.

afaik the emulator uses a virtual ip-address. maybe it's the one which starts with 10.0.+x
localhost is the android emulator
User avatar
cgreen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Wed Jul 16, 2008 10:16 am

Top

Postby acton » Tue Sep 16, 2008 10:16 pm

touchy! :o
not commenting on your stack :wink: , merely asking a different question if anyone knows about infrared stacks.
acton
Freshman
Freshman
 
Posts: 5
Joined: Mon Sep 15, 2008 8:27 pm
Location: Silicon Valley

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 2 guests