enver eroglu
Posts: 1
Nickname: enverer
Registered: Jun, 2005
|
|
how to change HttpURLConnection to socket connection
|
Posted: Jun 23, 2005 8:31 AM
|
|
Advertisement
|
hello i have a problem about a socket connection can you help me
i want to change HttpURLConnection connection to socket connection
here is
java.net.URL url = new java.net.URL("http://64.74.75.74/approot/webapp/ZOR/bare"); connection = new sun.net.www.protocol.http.HttpURLConnection(url, " ", 0); connection.setRequestMethod("POST"); connection.setDoInput(true); connectio n.setDoOutput(true); connection.setUseCaches(false); java.io.ObjectOutputStream out = new java.io.ObjectOutputStream(connection.getOutputStream()); out.writeObject(getTe xtFieldGiden().getText()); out.flush(); out.close();
return (String) (new java.io.ObjectInputStream(connection.getInputStream()).readObject());
how can i change it to socket connection
thank you very much
|
|