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.
精彩评论