J2ME HTTP Server?

R

Robert Mark Bram

Hi All!

Using WTK2.0 or WTK2.1, how can we create a HTTP Server?

When I look at the Javadocs for javax.microedition.io.HttpConnection, I see
that you can open a url for reading.. but I don't see how you can wait to
receive an incoming connection. I was thinking this would be the way to do
it - it seems compatible with the SMS and Socket connection paradigms.

Any advice would be most welcome!

Rob
:)
 
D

Darryl L. Pierce

Robert Mark Bram said:
Using WTK2.0 or WTK2.1, how can we create a HTTP Server?

When I look at the Javadocs for javax.microedition.io.HttpConnection, I
see that you can open a url for reading.. but I don't see how you can wait
to receive an incoming connection. I was thinking this would be the way to
do it - it seems compatible with the SMS and Socket connection paradigms.

HttpConnection is used to create *client* connections to an HTTP server, not
for receiving connections. If you want to act as an HTTP (or any protocol)
server, you have to open ServerSocketConnection (assuming such is supported
on the device in question, since it's not a required connection type) and
handle the protocol elements yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top