Git Product home page Git Product logo

chat-websocket-dart's Introduction

Example Chat Client/Server with Websockets in Dart

Super simple example of how to use websockets in dart on both client and server side. Sample provides a very simple chat server and client implementation. The server sets a default nickname on established connection which the client can then change. Entering the client nick and pressing Enter key will change it on the server and client. Entering in text into the bottom chat window and pressing Enter will send the text to all the clients connected.

chat-websocket-dart's People

Contributors

adam-singer 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

Watchers

 avatar  avatar  avatar  avatar

Forkers

a06kin

chat-websocket-dart's Issues

Unsolicited WebSocket server to client message

Hi,

I am trying to implement a WebSocket server which can push unsolicited message once client is connected.
However, all the dart WebSocket server example code use HttpServer and WebSocketTransformer, due to nature of HttpServer, it seems impossible to push unsolicited message.
Is it possible to use dart:io WebSocket class to implement a server ? This should be possible since it said WebSocket class is "A two-way HTTP communication object for client or server applications" in the API reference

Is there any example code ? How to bind an uri address using WebSocket class ?

Thanks a lot.

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.