GithubHelp home page GithubHelp logo

omegaui / tiny_chat_server_core Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 35 KB

A tiny chat server core written in dart that uses shelf_plus

License: GNU General Public License v3.0

Dart 100.00%
cli-server dart-server server-core shelf-server

tiny_chat_server_core's Introduction

tiny-chat-server-core

This is a very basic implementation of a passcode protected server, where a user can use this program to host a local server on its machine and let others join through the server-code and uniqueID.

Launching a server requires a server-config.json:

{
  "name": "\uD83D\uDE0E rock-n-roll \uD83D\uDE0E",
  "host-address": "192.168.190.151",
  "owner-id": "@omegaui",
  "connections-limit": 10, // -1 for unlimited users
  "allowed-users-list": ["xyz", "pqr"],
  "blocked-users-list": ["abc"],
  "push-previous-messages-to-new-users": true,
  "server-code": "devs"
}

Implementations:

  • Remote Connections
  • Blocking Users
  • Sending Files and other Codes

Launching

Simply launch internal/server.dart to start the server.

And later on for connections create instances of Client from client.dart:

import '../bin/data/user.dart';
import '../bin/internal/client.dart';

void main(){
  var host = "localhost:8080";
  var c1 = Client(host, User(uniqueID: 'omegaui', serverCode: "devs"));
  c1.send("hello");
  c1.send("What are you doing?");
}

tiny_chat_server_core's People

Contributors

omegaui avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.