Home  ›

User: amity

Info Reviews Forum Msgs.  

These are the most recent forum messages posted by amity:

Re: Is it possible to read http:// url via socket protocol ?
May 29, 2007, 2:27 AM
in the Java forum

If I use Port(80,8080 and 443) then only my SocketConnection is set up(showing in N/W monitor) otherwise no connection is showing.

Is it possible to read http:// url via socket protocol ?
May 23, 2007, 2:26 AM
in the Java forum

package connection; import display.Show; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.InputStream; import java.io.OutputStream; import javax.microedition.io.Connector; import javax.microedition.io.HttpConnection; import javax.microedition.io.SocketConnection; impo rt midlet.GCFMIDlet; public class Socket{ String url="socket://www.globallogic.com:443"; //St ring url="http://www.lambenttek.com:80"; SocketConnection scon=null; HttpConnection hcon=null; InputStream is=null; OutputStream os=null; DataInputStream din=null; DataOutputStream dout=null; StringBuffer buf= new StringBuffer(); StringBuffer header = new StringBuffer(); public Socket(GCFMIDlet midlet){ try{ //make a connection to server SocketConnection scon = (SocketConnection) Connector.open(url); //System.out.println("C onnection : "+scon); // set application-specific options on the socket. Call setSocketOption to set other options scon.setSocketOption(SocketConnection.DELAY , 1); scon.setSocketOption(SocketConnection.KE EPALIVE,1); scon.setSocketOption(SocketConne ction.LINGER,1); scon.setSocketOption(Socket Connection.RCVBUF,8000); scon.setSocketOptio n(SocketConnection.SNDBUF,8000); // send something to server os = scon.openOutputStream(); dout = new DataOutputStream(os); //os.write("GET /indus_diff/index.shtml HTTP/1.1 \r\n".getBytes()); dout.writeChars("GET /indus_diff/index.shtml HTTP/1.1\n"); // dout.writeChars("User-Agent : Profile/MIDP-2.0 Configuration/CLDC-1.0\n"); // dout.writeChars("Content-Language : en-US\r\n"); // ...

Socket connection in CLDC
May 17, 2007, 4:08 AM
in the Java forum

Hello, I have write a sample program to read the content of a URL via SocketConnection. I got success to make a socket connection with server. which I had conform to seem in n/w monitor which i enabled previously. But the problem is that nothing should ...

Subscribe to Phone Scoop News with RSS Follow @phonescoop on Threads Follow @phonescoop on Mastodon Phone Scoop on Facebook Follow on Instagram

 

Playwire

All content Copyright 2001-2024 Phone Factor, LLC. All Rights Reserved.
Content on this site may not be copied or republished without formal permission.