开发者

Flash client and HTTP connection with server

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜