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 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.