this is not a socket connection , it's a stateless HTTP connection.
you cannot open TCP sockets in the DoCoMo API.
:> -----Original Message-----
:> From: keitai-l-bounce@appelsiini.net [mailto:keitai-l-bounce@appelsiini.
:> net]On Behalf Of Manish Prabhune
:> Sent: Thursday, August 09, 2001 2:58 PM
:> To: keitai-l@appelsiini.net
:> Subject: (keitai-l) Re: Can i Open a socket connection using DOCOMO api
:>
:>
:> If you mean to open a socket and read data from the stream then
:> yes you can.
:>
:> Use
:>
:> try{
:> HttpConnection hc =
:> (HttpConnection)Connector.open("http://yoursite.com/data.txt",Con
nector.READ
:> ,true);
:> hc.setRequestMethod(HttpConnection.GET);
:> hc.connect();
:> InputStream is = hc.openInputStream();
:>
:>
:> //***************************************************************
:> *********
:> // This initializes the number of bytes to the
:> length og our data
:> download
:> // So that we need not randomly initialize it as =
:> new byte[1000]
:>
:> //***************************************************************
:> *********
:>
:> byte[] text1=new byte[3];
:> byte[] text2=new byte[1];
:>
:> is.read(text1);
:> s = new String(text1);
:> }
:>
:> is.close();
:> hc.close();
:>
:> }catch(Exception e){}
:>
:> Hope this works for you.
:> See detailed source code at www.imodeindia.com
:>
:> Manish
:> www.imodeindia.com
:>
:>
:> ----- Original Message -----
:> From: "Maneesh Agarwal" <maneesh@netesoft.com>
:> To: <keitai-l@appelsiini.net>
:> Sent: Thursday, August 09, 2001 2:32 PM
:> Subject: (keitai-l) Can i Open a socket connection using DOCOMO api
:>
:>
:> > Hi all
:> > Can i open a Socket connection to a server usng DoCoMo Api.?
:> > Is there some class provided bt docomo which i can use to
:> transfer bytes.?
:> >
:> > Please check more information on imode at http://www.virelex.com/
:> > Thanks in advance
:> > Maneesh Agarwal
:> >
:> >
:> >
:> > [ Need archives? How to unsubscribe?
http://www.appelsiini.net/keitai-l/ ]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Thu Aug 9 09:19:12 2001