GithubHelp home page GithubHelp logo

hprose-aauto's Introduction

Hprose for AAuto Quicker

Join the chat at https://gitter.im/hprose/hprose-aauto



Introduction

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:

  • AAuto Quicker
  • ActionScript
  • ASP
  • C++
  • Dart
  • Delphi/Free Pascal
  • dotNET(C#, Visual Basic...)
  • Golang
  • Java
  • JavaScript
  • Node.js
  • Objective-C
  • Perl
  • PHP
  • Python
  • Ruby
  • ...

Through Hprose, You can conveniently and efficiently intercommunicate between those programming languages.

This project is the implementation of Hprose for AAuto Quicker.

Usage

Synchronous Invoking

Hprose for AAuto Quicker only has a client, you can use it like this:

import hprose;

io.open();

var client = hprose.client.create("http://hprose.com/example/");
io.print(client.hello("world"));

execute("pause")
io.close();

Synchronous Exception Handling

If an error occurred on the server, or your service function/method throw an exception. it will be sent to the client, and the client will throw it as an exception. You can use the try statement to catch it.

Asynchronous Invoking

When you develop winform application, you'd better to use asynchronous invoking:

import win.ui;
import hprose;

/*DSG{{*/
var winform = ..win.form(text="AAuto Form";right=599;bottom=399)
winform.add(
button={cls="button";text="button";left=50;top=194;right=129;bottom=223;z=1};
edit={cls="edit";left=45;top=39;right=269;bottom=177;edge=1;multiline=1;z=2}
)
/*}}*/

winform.button.oncommand = function(id,event){
    var client = hprose.client.create("http://hprose.com/example/");
    client.hello("async world", function(result) {
        winform.edit.text = 'result: \r\n' ++ result;
    }, function(name, err) {
        winform.edit.text = 'error: \r\n' ++ err;
    });
}

winform.show()
win.loopMessage();

Asynchronous Exception Handling

When using asynchronous invoking, you need to pass an error callback function after succuss callback function to receive the server-side exception. If you omit this callback function, the client will ignore the exception, like never happened.

hprose-aauto's People

Contributors

andot avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hprose-aauto's Issues

自定义headers头参数合并问题

table.push(hps.headers,“X-Token: aaabbbccc”)

1561行
http.headers = ..string.join(owner.headers, '\r\n');
对headers数组合并,末尾差个’\r\n‘,
执行
http.headers += 'Content-Type: application/hprose\r\n';
后,上面的最后一条会和Content-Type: application/hprose\r\n 连成一条,没有换行

超时时间设置无效

http.setTimeouts 的设置必须紧接着,否则超时设置无效,一直都是默认30秒的超时
下面就是正确的方式
var http = ..inet.whttp( ,proxy, proxyBypass);
http.setTimeouts(owner.timeout, owner.timeout, owner.timeout);

行 1503

attempt to:perform arithmetic on
kind:variable(local)
name:'pos'
type:null
参数位置:0
数据类型:null
变量值:null

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.