jrpc

package module
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*registry.Registry
}

Server is just a parent for json-rpc server using websockets

func NewServer

func NewServer() *Server

Creates new server with initialised registry

func (*Server) WebsocketHandler

func (s *Server) WebsocketHandler(w http.ResponseWriter, r *http.Request)

Http server handler to upgrade net.Conn to jrpc Conn and forwards connection handling to the connection gorutines.

func (*Server) WebsocketHandlerGin added in v0.0.3

func (s *Server) WebsocketHandlerGin(g *gin.Context)

Go gin handler. There is a bug that this handler does not work with gin Group. Have no idea why. So its mandatory to use gin router.GET() to register the route.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL