Giter Site home page Giter Site logo

xtrmstep / signalrserverclient Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 855 KB

A working sample of a standalone SignalR server with two clients (backend and frontend)

C# 77.14% HTML 15.12% CSS 5.63% JavaScript 2.12%
signalr dotnet-core realtime-messaging aspnet-core

signalrserverclient's Introduction

SignalRServerClient

A working sample of a standalone SignalR server with two clients (backend and frontend).

NB: the current implementation is not a showcase.

Componnets

Component Descripton Ports
Server regular Web API which hosts a SignalR hub HTTP/1 5001
GrpcService gRpc service which hosts a SignalR hub HTTP/2 5000, HTTP/1 5001
ClientBackend regular API which connects to SignalR as a client HTTP/1 5002
ClientFrontend regular web application which connects to SignalR from Javascript code as a client HTTP/1 5003

SignalR hub is hosted on TCP port 5001. Only one server should be running at a time. In this example it's possible to send a message from a server to all clients who is connected to the SignalR hub.

Hint about CORS

The Server is a SinglanR server which configure CORS to allow connection from JS client. The backend client doesn't need CORS.

Hint about gRPC

gRpc service and Signar hub cannot use the same port because they use different protocols. In gRpc service there is an additional configuration to listen two different ports by Kestrel.

References

signalrserverclient's People

Contributors

xtrmstep avatar

Watchers

 avatar  avatar

Forkers

moayyaed

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.