cyberco said:
Uh is that your site? I'm asking because it does not look very
authoritative on the problem at hand. It says that it will work on the
Nokia but not on the Sony Ericsson P900.
I think I know now what you are trying to say. On J2ME, it is not mandatory
under the MIDLET 1 specification to provide the Socket class for arbitrary
sockets. However it is mandatory to support HTTP-Connections. So in order
to circumvent this limitation you create a HTTP proxy which takes this
HTTP-Connection from the phone, create a normal socket on the proxy etc.
What you were baffling us all with if I see this scenario correct is simply
that this HTTP connection *is* full duplex, however you cannot access and
use it in the same way as a normal socket. Full duplex means you can send
and receicve and HTTP absolutely requires this (send header, receive
result). But you kept saying you had no Full-duplex connection, which is
quite simply wrong - and very puzzling too. It would mean you could only
send or receive per connection, so that you would need two connections for
full-duplex on the phone. And I'm pretty sure that this is not the case.
MIDP2 defines socket which is probably what you'd like to have. But if not,
and MIDP1 does not define them, then some sort of application proxy on a
WAP-gateway is the way to go. Never the less, what you're having is one
full-duplex socket, because you use it for reading from the phone and
writing data to the phone. It may be that you use several since HTTP is
stateless and generally does one connection per request ("send cycle", if
you want) but maybe you can force it in the non-closing mode where after a
request got sent it will not close the connection but stay open (NPH).
Don't know if the feature is there, I don't do MIDLETs. Anyway, back to the
original question: What is the best way to do it ? My answer is, it depends
a lot on the protocol on the other side of the proxy. It may be very easy
to map it onto the HTTP stream or damn difficult. What type of protocol is
there?
CU
Rene