Re: Splitting a full-duplex socket
From: Rene (invalid_at_email.addr)
Date: 01/07/05
- Next message: opalpa_at_gmail.com: "Re: Common Pair Class"
- Previous message: Alex Kizub: "Re: Why can't the debugger find my JDBC Driver."
- In reply to: cyberco: "Re: Splitting a full-duplex socket"
- Next in thread: Chris Uppal: "Re: Splitting a full-duplex socket"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 06 Jan 2005 23:38:23 GMT
"cyberco" <cyberco@gmail.com> wrote:
> Rene wrote:
> > "cyberco" <cyberco@gmail.com> wrote:
> > [snip]
> > > I did (and still do) not know whether that simple solution would
> work
> > > and what the optimal solution would be (should I simply use an
> > > InputStream? Or a ByteArrayInputStream? How many bytes should I
> read?
> > > Etcetera.) That's why I asked for some advice here. But to
> illustrate
> > > what my situation was I said that I needed it for a mobile phone
> that
> > > doesn't support full-duplex sockets to communicate with a
> server-side
> > > application that ONLY accepts full-duplex sockets. That got most of
> the
> > > responders off into the wrong direction. Many got confused by
> reading
> > > about devices not supporting full-duplex sockets.
> > >
> > > Anyway, in the meantime I implemented a proxy that reads and
> forwards
> > > characters (using seperate threads). It seems to work inside the
> proxy,
> > > but it might not be an optimal solution :( The client side still
> > > doesn't work though. I'll keep debugging.
> > > I apologize to everybody here I might have confused.
> >
> > And which mobile phone would that be?
>
> See a list here:
> http://www.google.nl/search?q=cache:dEnCQxc5x_UJ:www.funrungames.com/midp
> 2.html+midp+duplex+socket&hl=en cyberco
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
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service $9.95/Month 30GB
- Next message: opalpa_at_gmail.com: "Re: Common Pair Class"
- Previous message: Alex Kizub: "Re: Why can't the debugger find my JDBC Driver."
- In reply to: cyberco: "Re: Splitting a full-duplex socket"
- Next in thread: Chris Uppal: "Re: Splitting a full-duplex socket"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|