chattp2

package
v0.0.0-...-9bbcfaf Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a chattp2 client

func NewClient

func NewClient(sender, receiver string) (*Client, error)

NewClient returns new Client

func (*Client) Run

func (c *Client) Run(ctx context.Context)

Run chattp2 client.

type Message

type Message struct {
	Content  string `json:"content"`
	Sender   string `json:"sender"`
	Receiver string `json:"receiver"`
}

Message represents a chat message

type Server

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

Server represents the chattp2 server, a chat server based on HTTP2

func NewServer

func NewServer() (*Server, error)

NewServer returns a new chattp2 Server

func (*Server) Run

func (s *Server) Run(ctx context.Context)

Run chattp2 server. Server is listening for client connections

Jump to

Keyboard shortcuts

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