Giter VIP home page Giter VIP logo

dart-force's People

Contributors

jorishermans avatar radimsuckr avatar scorpiion 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

dart-force's Issues

A simple Hello example for a WebSocket server

Just for a start I would like to see the Dart source for a simple "Hello" example server that responds with "Hello Foo" when it receives a "Foo" message. I could not figure that out from the instructions on the Pub page. Thanks.

can I use dart-force to do server push,how ?

I want to use timer to send data to the client for every 3 seconds after websocket connection has been establish .
I don't know to how to do this use dart-force !! Is there any example for reference ???

provide a reply method in Sender

It would be nice to provide a reply method, so you can just call

sender.reply('received', data);

instead of

sender.sendTo(fme.wsId, 'received', data);

Connect 2 server together

Hi,

I actually use dart-force for my project, and i'm in a situation where getting the possibility of connecting 2 server together would be nice.

I don't know if it's in the "philosophy" of this library or not. but for me it will be nice.

Sending Files

Hi, I was just wondering if it was possible to send file/data other than strings through the use of forceServer.send(). If possible, would you be able to typecast the object once it reached the client? I figured once it is serialized you would have to do a conversion afterwards.

Can we use typed methods for events?

Hi,

I saw this in an example:

forceClient.on("notifications"

Using strings can get us into trouble (hard to check with tools, too easy to misspell, no code completion)

Instead, can we do this:

forceClient.onNotifications.listen((e) => ...

Thanks!

Authentication/Authorization

Mentioned as a long term goal but has no issue associated with it. Appears that the client is allowed to set profile setting and no current hook to valid it nor what topics can be subscribed to and by whom.

Unable to run on windows

start long polling server ... /ws/polling Uncaught Error: SocketException: OS Error: An invalid argument was supplied.
I believe its the case that in your simple_web_server.dart line13 you need to choose InternetAddress.ANY_IP_V4 for windows systems.

Jasmine engine support

Hello, I personallly don't like using mustache as view rendering engine, however I would like to know if this framework supports jasmine. does it?

Support for public directory.

There is the ability to serve files but would be desirable to have a way to set a publicly accessible folder(s). A default to ../web probably makes the most sense.

Raw value in ServerSocketConnector

A raw value has been left in the code:

part of dart_force_server_lib;

class ServerSocketConnector extends Connector {

int port;
String address;

StreamController _controller;

ServerSocketConnector({this.address: '127.0.0.1', this.port: 4041}) {
_controller = new StreamController();
}

Future start() {
ServerSocket.bind(this.address, 4041) // Just here
.then((serverSocket) {
serverSocket.listen((socket) {
_controller.add(new ServerSocketWrapper(socket));

       });
});
return _completer.future;

}

}

Routing

Currently there is no routing support for a ForceServer. There are times even when using websockets that you can't avoid REST urls (for example when working with external APIs like paypal) for use as redirects. Are there any plans to support routing in Force?

Providing an offline strategy

When the connection is lost with the server, we are going to store all the socket events into websql or localstorage.
Whenever the connection is back established the events will be fired in the same order. So you can bring the state of the client back in order with the server.

We will use Cargo for this.

Cant Start Force With GAE

I have this minimal code and I keep getting

INFO: default: "GET /_ah/health?IsLastSuccessful=no HTTP/1.1" 503 -
WARNING: All instances may not have restarted

when I try to start the local server. Here is the code

server.dart

library force_angular;

import 'package:force/force_serverside.dart';
import 'package:forcemvc/force_mvc.dart';
import 'package:mustache4dart/mustache4dart.dart';
import 'package:appengine/appengine.dart';

main() {

    // Create a force server
    ForceServer fs = new ForceServer();

    runAppEngine(forceServer.requestHandler).then((_) {

        // Setup logger
        fs.setupConsoleLog();

        // we need to change {{ into [[ because of angular
        if (fs.server.viewRender is MustacheRender) {
            MustacheRender mustacheRender = fs.server.viewRender;
            mustacheRender.delimiter = new Delimiter('[[', ']]');
        }

        // Tell Force what the start page is!
        fs.server.use("/", (req, model) => "angularforce");

    });
}

angularforce.html

<!DOCTYPE html>
    <html ng-app>
    <head>
        <title>Hello World GAE</title>
    </head>
    <body>

        <h1>Hello HTML</h1>

        <script type="applicataion/dart" src="angularforce.dart"></script>
        <script type="text/javascript" src="packages/browser/dart.js"></script>
    </body>
</html>

angularforce.dart

import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';


void main() {
  applicationFactory()
      .run();
}

Encrypted sockets.

I had actually started my own Dart websocket based client/server thing (codenamed javelin). Its does some acks and registration steps to allow things like automatic configurable RC4 encryption.

It that something you might want to include in force if I gave you the code?

More toolable way to handle connecting?

How about, instead of:

 forceClient.onConnecting.listen((e) {
      if (e.type=="connected") {
        ...
      } else if (e.type=="disconnected") {
        ...
      }
 });

The forceClient can return a Future that completes when the connection is complete. I'd like to try to avoid checking types against strings if possible. Hard to spellcheck and refactor and statically analyze.

Check the WebSocket class for some inspiration on how to deal with a connection that completes and disconnects.

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.