ws

package
v0.0.0-...-75a017b Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

websocket https://www.rfc-editor.org/rfc/rfc6455 https://github.com/gobwas/ws-examples

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Echo

func Echo(conn net.Conn)

Echo 回显消息

Types

type Websocket

type Websocket struct{}

Websocket http处理器,访问任何地址都升级到websocket 同时为连接开启goroutine,回显消息

func (*Websocket) ServeHTTP

func (s *Websocket) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP 实现http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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