Closed platelk closed 10 years ago
It's a simple implementation of a "ForceClient" for the server side.
This allow this kind of code:
int main() {
ForceClient fc = new ForceClient(host: "127.0.0.1", port: "9223"); ForceServer fs = new ForceServer( port: 9223);
fs.start().then((e) { fc.connect(); fc.onConnected.listen((e) { fs.on("test", (e, sendable) { print("Receive from server: ${e.json}"); sendable.send('test', e.json); fs.close("Stop"); }); fc.on("test", (e, sender) { print("Receive from client: ${e.json}"); }); fc.send('test', "Trololo"); }); fc.onDisconnected.listen((e) { print("Deco: ${e}"); }); });
}
It's a simple implementation of a "ForceClient" for the server side.
This allow this kind of code:
int main() {
ForceClient fc = new ForceClient(host: "127.0.0.1", port: "9223"); ForceServer fs = new ForceServer( port: 9223);
}