Hprose is a High Performance Remote Object Service Engine.
It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.
Hprose supports many programming languages, for example:
Through Hprose, You can conveniently and efficiently intercommunicate between those programming languages.
This project is the implementation of Hprose for JavaScript.
Hprose 2.0 for JavaScript Documents(中文版): https://github.com/hprose/hprose-js/wiki
All of the above browsers (except asterisk marked) support cross-domain invoking with Hprose for JavaScript.
TCP is only available on iOS for APICloud, because there is a bug of APICloud Android SDK, and they don't want to fix this bug.
You don't need use the javascript source files. You only need include hprose.js
in your html.
The file FlashHttpRequest.swf
you can put it on anywhere, and then specify its load path by setting the flashpath
attribute in the script
tag. If you omit this attribute, the default path is current path.
If an error occurred on the server, or your service function/method throw an exception, it will be sent to the client. You need to pass an error callback function after succuss callback function to receive it. If you omit this callback function, the client will ignore the exception, like never happened.
For example:
<html>
<head>
<script type="text/javascript" src="hprose.js" flashpath="/"></script>
</head>
<body>
<script type="text/javascript">
var client = hprose.Client.create("http://www.hprose.com/example/", ["hello"]);
client.hello("World!")
.then(function(result) {
alert(result);
}, function(err) {
alert(err);
});
</script>
</body>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。