Phone Scoop

printed August 29, 2015
See this page online at:
http://www.phonescoop.com/forums/forum.php?fm=m&ff=10&fh=1179047

Home  ›  Forums  ›

Java

all discussions

Is it possible to read http:// url via socket protocol ?

amity

May 23, 2007, 2:26 AM
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;
import midlet.GCFMIDlet;

public class Socket{

String url="socket://www.globallogic.com:443";
//String 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{

//m...
(continues)
...
katrina

May 28, 2007, 1:58 PM
I see here you are trying to connect to port 443 which is normally for https, did you get any different results when using port 80?
...
amity

May 29, 2007, 2:27 AM
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.
...

You must log in to reply.

Please log in to report a message to the moderator.


all discussions

Subscribe to Phone Scoop News with RSS Follow @phonescoop on Twitter Phone Scoop on Facebook Subscribe to Phone Scoop on YouTube Follow on Instagram

 

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