kontraktor_client 0.0.4 copy "kontraktor_client: ^0.0.4" to clipboard
kontraktor_client: ^0.0.4 copied to clipboard

An client to talk to java/javascript written kontraktor "remoted actors"

example/example.dart

import '../lib/kontraktor-client.dart';

void main() async {
  KontraktorConnection con = KontraktorConnection("http://localhost:8087/api");
  await con.connect();
  print( "res0 "+await con.ask("test", ["pokpok"]) );
  print( "res1 "+await con.ask("test", ["pokpok1"]) );
  print( "res2 "+await con.ask("test", ["pokpok2"]) );

  print( "test2 "+await con.ask("test1",
    [
      "pokpok2",
      (res,e) {
        print("cb test2 $res $e");
      }
    ]
  )
  );
  var login = await con.ask("login", ["xx@xx.xx","qweqwe", (res,err) async {
    print( "Session CB received:$res $err" );
  }]);
  var sess = login["session"];
  String res1 = await sess.ask( "hello", ["pokpok"] );
  print( "res: $res1" );

  print( con.sid );
}
0
likes
35
pub points
0%
popularity

Publisher

unverified uploader

An client to talk to java/javascript written kontraktor "remoted actors"

Repository (GitHub)
View/report issues

License

LGPL-3.0 (LICENSE)

Dependencies

http, uuid

More

Packages that depend on kontraktor_client