开发者

Flash client and HTTP connection with server

开发者 https://www.devze.com 2023-01-30 08:42 出处:网络
Can a flash client program communicate with a server using HTTP connection like it would do in a JAVA-oriented fashion:

Can a flash client program communicate with a server using HTTP connection like it would do in a JAVA-oriented fashion:

String URLS = "http://" + s.getHostName()
+ ":8888/Producer/getItems";
try {
URL url = new URL(URLS);

InputStream is = url.openStream();
ObjectInputStream ois = new ObjectInputStream(is);

re开发者_开发问答s = (Items[]) ois.readObject();
is.close();
ois.close();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}


Obviously it can. Check the URLRequest manual. And pay special attention to the security chapter that is linked from the manual.

0

精彩评论

暂无评论...
验证码 换一张
取 消