Git Product home page Git Product logo

Comments (4)

adam-singer avatar adam-singer commented on June 2, 2024

WebSocket is relativly lower level class. Sounds like you want some more framework support. WebSocket should be hashable object, so you could just hash them per connection. This code is really old and not valid. Checkout what might be new WebSocket code for dart

https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/samples/dartiverse_search

https://github.com/dart-lang/dart-samples/tree/master/web/html5/websockets/basics

from chat-websocket-dart.

adam-singer avatar adam-singer commented on June 2, 2024

Also check out some projects on pub that currently use WebSocket http://pub.dartlang.org/search?cx=009011925481577436976%3Ah931xn2j7o0&ie=UTF-8&hl=en&q=websocket

from chat-websocket-dart.

MartinHo12 avatar MartinHo12 commented on June 2, 2024

Hi,

Thanks for the information, but I still can't find solution.

In RFC6455  page27 : 

" A data frame MAY be transmitted by either the client or the server at
any time after opening handshake completion and before that endpoint
has sent a Close frame"

The current WebSocket class does not have 'bind' method, so Websocket class alone can not be used as a server.  WebSocket server can only be transformed from HttpServer. This makes the server 'listen' only.  Server can only transmit data frame after receiving a client data frame.  Is this correct ? If this is correct, the WebSocket implementation does not follow RFC6455 completely. Interesting ... 

from chat-websocket-dart.

adam-singer avatar adam-singer commented on June 2, 2024

Web sockets are encapsulated within http sessions. Its not a standalone service outside of that. So it most likely is instanciated via http request and then upgraded to web socket.

from chat-websocket-dart.

Related Issues (1)

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.