server

package
v0.0.0-...-c1f3fae Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package server implements a server for Chat service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(port string)

StartServer starts the server

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection stores the streams for active userss

type Server

type Server struct {
	pb.UnimplementedBroadcastServer
	Connection map[string]*Connection
}

func (*Server) BroadcastMessage

func (s *Server) BroadcastMessage(_ context.Context, msg *pb.Message) (*pb.Close, error)

func (*Server) CreateStream

func (s *Server) CreateStream(pconn *pb.Connect, stream pb.Broadcast_CreateStreamServer) error

Jump to

Keyboard shortcuts

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