The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by hoshing]

I need to write a program for a moblie (MIDP 1.0 and CLDC 1.0 compliant) with
512kB runtime memory and supporting up to 3 socket connection. This program
is a game, i want it to connect directly with other mobile of the same model
to play the interactive game.

Is it possible to use the socket connection to link up two mobiles? If so,
one mobile need to act as a server, but how the other mobile (client) know
this server mobile's IP address? Suppose they communicate through IrDa, use
"127.0.0.1" as in the example of Chapter 13.4?

Do I need to use JXTA or JXME?

Please help, quite urgent, thanks a lot!
import-bot (20211) [Avatar] Offline
#2
Re: Socket Connection or JXTA?
[Originally posted by dhemphill]

Dennis,

In order to directly connect to another mobile device (over the air), the
mobile you are targeting must have a static IP address that is referencable
from the public internet (unless the wireless ISP allows mobiles on the same
network to know about each other and reference each other).

Nextel does support a data plan with static IPs for a phone. Not sure about
other ISPs. If IrDA is supported by the JVM/device you are targeting, you
should be able to open a comm port that is associated with the Ir port (this
will be device specific and is not required by MIDP 1.0).

Using MIDP 1.0, your best option (my opinion) would be to link one or more
mobiles through some peer-to-peer architecture, such as JXTA, etc. Unless you
have an addressable MIDP client, however, the MIDP apps will need to poll the
server for updates or remain connected so they are conversational with the
server (and thus, other mobile devices).

MIDP 2.0, and the inclusion of the Push Registry, will require ISPs to support
some method of referencing mobile devices from a server. You'll need to wait
until mid 2003 or so for this.

> I need to write a program for a moblie (MIDP 1.0 and CLDC 1.0 compliant) with
> 512kB runtime memory and supporting up to 3 socket connection. This program
> is a game, i want it to connect directly with other mobile of the same model
> to play the interactive game.
>
> Is it possible to use the socket connection to link up two mobiles? If so,
> one mobile need to act as a server, but how the other mobile (client) know
> this server mobile's IP address? Suppose they communicate through IrDa, use
> "127.0.0.1" as in the example of Chapter 13.4?
>
> Do I need to use JXTA or JXME?
>
> Please help, quite urgent, thanks a lot!