Minimal and idiomatic WebSocket library for Go

Overview

websocket

godoc coverage

websocket is a minimal and idiomatic WebSocket library for Go.

Install

go get nhooyr.io/websocket

Highlights

Roadmap

  • HTTP/2 #4

Examples

For a production quality example that demonstrates the complete API, see the echo example.

For a full stack example, see the chat example.

Server

http.HandlerFunc(func (w http.ResponseWriter, r *http.Request) {
	c, err := websocket.Accept(w, r, nil)
	if err != nil {
		// ...
	}
	defer c.Close(websocket.StatusInternalError, "the sky is falling")

	ctx, cancel := context.WithTimeout(r.Context(), time.Second*10)
	defer cancel()

	var v interface{}
	err = wsjson.Read(ctx, c, &v)
	if err != nil {
		// ...
	}

	log.Printf("received: %v", v)

	c.Close(websocket.StatusNormalClosure, "")
})

Client

ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()

c, _, err := websocket.Dial(ctx, "ws://localhost:8080", nil)
if err != nil {
	// ...
}
defer c.Close(websocket.StatusInternalError, "the sky is falling")

err = wsjson.Write(ctx, c, "hi")
if err != nil {
	// ...
}

c.Close(websocket.StatusNormalClosure, "")

Comparison

gorilla/websocket

Advantages of gorilla/websocket:

Advantages of nhooyr.io/websocket:

golang.org/x/net/websocket

golang.org/x/net/websocket is deprecated. See golang/go/issues/18152.

The net.Conn can help in transitioning to nhooyr.io/websocket.

gobwas/ws

gobwas/ws has an extremely flexible API that allows it to be used in an event driven style for performance. See the author's blog post.

However when writing idiomatic Go, nhooyr.io/websocket will be faster and easier to use.

Issues
  • Gin compatabilty

    Gin compatabilty

    I'm trying to integrate this into my existing app which is using the Gin framework, but I'm unable to establish a connection from the browser. Any ideas how I can get this working?

    Server

    package main
    
    import (
    	"context"
    	"log"
    	"net/http"
    	"time"
    
    	"github.com/gin-gonic/gin"
    	"nhooyr.io/websocket"
    	"nhooyr.io/websocket/wsjson"
    )
    
    func main() {
    	router := gin.New()
    
    	router.GET("/ws", handler)
    
    	router.Run(":7000")
    }
    
    func handler(c *gin.Context) {
    	log.Println("upgrading")
    	conn, wsErr := websocket.Accept(c.Writer, c.Request, &websocket.AcceptOptions{
    		InsecureSkipVerify: true,
    	})
    
    	if wsErr != nil {
    		c.AbortWithError(http.StatusInternalServerError, wsErr)
    		return
    	}
    
    	defer conn.Close(websocket.StatusInternalError, "Closed unexepetedly")
    
    	log.Println("ready")
    
    	ctx, cancel := context.WithTimeout(c.Request.Context(), time.Minute)
    	defer cancel()
    	ctx = conn.CloseRead(ctx)
    
    	tick := time.NewTicker(time.Second * 5)
    	defer tick.Stop()
    
    	for {
    		select {
    		case <-ctx.Done():
    			log.Println("done")
    			conn.Close(websocket.StatusNormalClosure, "")
    			return
    		case <-tick.C:
    			writeErr := wsjson.Write(ctx, conn, map[string]interface{}{
    				"msg": "hello",
    			})
    			if writeErr != nil {
    				log.Println(writeErr)
    				return
    			}
    		}
    	}
    }
    

    Client

    const ws = new WebSocket('ws://localhost:7000/ws');
    ws.onopen = console.log;
    ws.onmessage = console.log;
    

    JS Error WebSocket connection to 'ws://localhost:7000/ws' failed: Error during WebSocket handshake: net::ERR_INVALID_HTTP_RESPONSE

    Server logs

    [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
     - using env:   export GIN_MODE=release
     - using code:  gin.SetMode(gin.ReleaseMode)
    
    [GIN-debug] GET    /ws                       --> main.handler (1 handlers)
    [GIN-debug] Listening and serving HTTP on :7000
    2019/10/25 15:17:49 upgrading
    2019/10/25 15:17:49 ready
    2019/10/25 15:17:54 done
    
    enhancement 
    opened by nmec 21
  • Deflate extension

    Deflate extension

    See https://tools.ietf.org/html/rfc7692

    Investigate whether we want this.

    enhancement 
    opened by nhooyr 18
  • Pool buffers in wspb/wsjson

    Pool buffers in wspb/wsjson

    Opportunities for optimization available in

    • wspb
    • wsjson
    • Dial bufio read writers.
    opened by nhooyr 18
  • Expose API to send pings

    Expose API to send pings

    https://stackoverflow.com/questions/23238319/websockets-ping-pong-why-not-tcp-keepalive

    enhancement 
    opened by nhooyr 15
  • Weird behaviour when channelling go-capnproto2 over websocket

    Weird behaviour when channelling go-capnproto2 over websocket

    My setup is a little convoluted. I use capnproto rpc over websockets (to simplify deployment) between my programs. However, the websocket server keeps failing to read a header somehow and crashes.

    rpc: writing return: failed to write msg: websocket closed: failed to read header: EOF
    

    and on the Dialer side:

    rpc: writing finish: failed to write msg: context canceled
    

    Sometimes both ends cancel their contexts at the same time. I'm not sure why.

    bug 
    opened by Vaelatern 14
  • Improve CloseError API

    Improve CloseError API

    I think the current API is a little obnoxious since it forces you to use xerrors.As to get the close error code which is very annoying.

    Also people forget to use xerrors.As, see https://github.com/sumorf/deribit-api/blob/6b581052e02d0808bed0bdc7a04f3dc4582e70d3/stream.go#L30

    @sumorf

    I don't like the ceremony involved with xerrors.As so I'd like to provide some sort of convenience API to get the error code.

    opened by nhooyr 13
  • Allow single frame writes

    Allow single frame writes

    See #57

    Some websocket implementations cannot handle fragmented messages and the current API only allows writing fragmented messages because you write all your data first to a writer and then call close which writes a continuation fin frame.

    It may also be good for performance.

    I'm not going to expose an API for this right now, opening this issue to see how badly its wanted.

    enhancement 
    opened by nhooyr 13
  • Documentation should note that package ignores protection against untrusted client

    Documentation should note that package ignores protection against untrusted client

    The client does not mask sent messages or verify the the Sec-WebSocket-Accept header. Because these features are required by the protocol and related to security, the documentation should note the omission of the features.

    It's unlikely that the package will be used in an application running untrusted code, but the package might be used in a websocket proxy that forwards requests from untrusted code.

    docs 
    opened by propertyscott 12
  • Add chat example

    Add chat example

    Hello @nhooyr, maybe you could add chat example something like https://github.com/gorilla/websocket/tree/master/examples/chat would be easier to compare both implementations and also would serve as documentation.

    docs 
    opened by svycka 12
  • Option to disable message read limit completely

    Option to disable message read limit completely

    I do not want to limit the size of possible messages. Currently, the only way to do this is to set the read limit to a very high number. Would it be possible to add an option to completely disable the limit?

    opened by SoMuchForSubtlety 0
  • How do I use the local proxy network in client side?

    How do I use the local proxy network in client side?

    use lantern etc.

    opened by rockfirm 0
  • Bump github.com/gin-gonic/gin from 1.6.3 to 1.7.4

    Bump github.com/gin-gonic/gin from 1.6.3 to 1.7.4

    issue #318

    opened by kirill-scherba 3
  • Update github.com/gin-gonic/gin

    Update github.com/gin-gonic/gin

    Hi!

    Could you please update the https://github.com/gin-gonic/gin. Github Dependabot send alerts to projects uses your nhooyr/websocket project because you use the https://github.com/gin-gonic/gin v1.6.3, but they need Patched version: 1.7.0.

    See the message:

    CVE-2020-28483 high severity Vulnerable versions: < 1.7.0 Patched version: 1.7.0 This affects all versions of package https://github.com/gin-gonic/gin under 1.7.0. When gin is exposed directly to the internet, a client's IP can be spoofed by setting the X-Forwarded-For header.

    I have use your https://github.com/nhooyr/websocket project in my https://github.com/kirill-scherba/teowebrtc project for make webrtc signaling client/server and this Github Dependabot alert is placed in my project page now :-)

    I think you need just execute go get -u and publish new tag!

    Thanks. Best regards, Kirill Scherba.

    opened by kirill-scherba 2
  • Not working with Binance WebSocket API

    Not working with Binance WebSocket API

    Hi,

    I have a weird problem using this package with Binance WebSocket API. Just after I got stream subscription confirmation, connection is closed (code 1008). At the beginning I was thinking about contacting with Binance support, but then I tried the same code but using Gorilla WebSockets package and... it worked fine.

    Here is code nhooyr package version (not working):

    package main
    
    import (
    	"context"
    	"log"
    	"os"
    	"os/signal"
    	"time"
    
    	"nhooyr.io/websocket"
    	"nhooyr.io/websocket/wsjson"
    )
    
    type subscribeMessage struct {
    	Method string   `json:"method"`
    	Params []string `json:"params"`
    	Id     int      `json:"id"`
    }
    
    func main() {
    	interrupt := make(chan os.Signal, 1)
    	signal.Notify(interrupt, os.Interrupt)
    	ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
    	defer cancel()
    
    	c, _, err := websocket.Dial(ctx, "wss://stream.binance.com:9443/stream", nil)
    	if err != nil {
    		log.Println("dial:", err)
    		return
    	}
    	defer func() { _ = c.Close(websocket.StatusNormalClosure, "") }()
    
    	if err = wsjson.Write(ctx, c, subscribeMessage{
    		Method: "SUBSCRIBE",
    		Params: []string{"[email protected]@100ms"},
    		Id:     100,
    	}); err != nil {
    		log.Println("write:", err)
    		return
    	}
    
    	done := make(chan struct{})
    
    	go func() {
    		defer close(done)
    		for {
    			_, message, err := c.Read(ctx)
    			if err != nil {
    				log.Println("read:", err)
    				return
    			}
    			log.Printf("recv: %s", message)
    		}
    	}()
    
    	select {
    	case <-interrupt:
    		log.Println("interrupt")
    	case <-done:
    		return
    	}
    
    	err = c.Close(websocket.StatusNormalClosure, "")
    	if err != nil {
    		log.Println("write close:", err)
    		return
    	}
    	<-done
    }
    
    

    And here is Gorilla version:

    package main
    
    import (
    	"context"
    	"log"
    	"os"
    	"os/signal"
    	"time"
    
    	"github.com/gorilla/websocket"
    )
    
    type subscribeMessage struct {
    	Method string   `json:"method"`
    	Params []string `json:"params"`
    	Id     int      `json:"id"`
    }
    
    func main() {
    	interrupt := make(chan os.Signal, 1)
    	signal.Notify(interrupt, os.Interrupt)
    	ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
    	defer cancel()
    
    	c, _, err := websocket.DefaultDialer.DialContext(ctx, "wss://stream.binance.com:9443/stream", nil)
    	if err != nil {
    		log.Println("dial:", err)
    		return
    	}
    	defer func() { _ = c.Close() }()
    	err = c.WriteJSON(subscribeMessage{
    		Method: "SUBSCRIBE",
    		Params: []string{"[email protected]@100ms"},
    		Id:     100,
    	})
    	if err != nil {
    		log.Println("write:", err)
    		return
    	}
    	done := make(chan struct{})
    
    	go func() {
    		defer close(done)
    		for {
    			_, message, err := c.ReadMessage()
    			if err != nil {
    				log.Println("read:", err)
    				return
    			}
    			log.Printf("recv: %s", message)
    		}
    	}()
    
    	select {
    	case <-interrupt:
    		log.Println("interrupt")
    	case <-done:
    		return
    	}
    
    	err = c.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
    	if err != nil {
    		log.Println("write close:", err)
    		return
    	}
    	<-done
    	return
    }
    
    

    Any ideas what's wrong? Thanks!

    opened by dar7man 6
  • wspb.go uses deprecated protobuf package

    wspb.go uses deprecated protobuf package

    I love the idea of the protobuf helpers in wspb.go, but when trying to use them I noticed that wspb.go imports github.com/golang/protobuf/proto. Since this module is deprecated, this helper can't easily be used in a codebase using the newer protobuf library (google.golang.org/protobuf).

    From https://github.com/golang/protobuf:

    It has been superseded by the google.golang.org/protobuf module, which contains an updated and simplified API, support for protobuf reflection, and many other improvements. We recommend that new code use the google.golang.org/protobuf module.

    It would be wonderful if this import could be switched out to use the newer module 😀

    enhancement 
    opened by iamcalledrob 1
  • Bump github.com/gin-gonic/gin from 1.6.3 to 1.7.0

    Bump github.com/gin-gonic/gin from 1.6.3 to 1.7.0

    Bumps github.com/gin-gonic/gin from 1.6.3 to 1.7.0.

    Release notes

    Sourced from github.com/gin-gonic/gin's releases.

    Release v1.7.0

    BUGFIXES

    • fix compile error from #2572 (#2600)
    • fix: print headers without Authorization header on broken pipe (#2528)
    • fix(tree): reassign fullpath when register new node (#2366)

    ENHANCEMENTS

    • Support params and exact routes without creating conflicts (#2663)
    • chore: improve render string performance (#2365)
    • Sync route tree to httprouter latest code (#2368)
    • chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa (#2375)
    • chore(performance): improve countParams (#2378)
    • Remove some functions that have the same effect as the bytes package (#2387)
    • update:SetMode function (#2321)
    • remove a unused type SecureJSONPrefix (#2391)
    • Add a redirect sample for POST method (#2389)
    • Add CustomRecovery builtin middleware (#2322)
    • binding: avoid 2038 problem on 32-bit architectures (#2450)
    • Prevent panic in Context.GetQuery() when there is no Request (#2412)
    • Add GetUint and GetUint64 method on gin.context (#2487)
    • update content-disposition header to MIME-style (#2512)
    • reduce allocs and improve the render WriteString (#2508)
    • implement ".Unwrap() error" on Error type (#2525) (#2526)
    • Allow bind with a map[string]string (#2484)
    • chore: update tree (#2371)
    • Support binding for slice/array obj [Rewrite] (#2302)
    • basic auth: fix timing oracle (#2609)
    • Add mixed param and non-param paths (port of httprouter#329) (#2663)
    • feat(engine): add trustedproxies and remoteIP (#2632)
    Changelog

    Sourced from github.com/gin-gonic/gin's changelog.

    Gin v1.7.0

    BUGFIXES

    • fix compile error from #2572 (#2600)
    • fix: print headers without Authorization header on broken pipe (#2528)
    • fix(tree): reassign fullpath when register new node (#2366)

    ENHANCEMENTS

    • Support params and exact routes without creating conflicts (#2663)
    • chore: improve render string performance (#2365)
    • Sync route tree to httprouter latest code (#2368)
    • chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa (#2375)
    • chore(performance): improve countParams (#2378)
    • Remove some functions that have the same effect as the bytes package (#2387)
    • update:SetMode function (#2321)
    • remove a unused type SecureJSONPrefix (#2391)
    • Add a redirect sample for POST method (#2389)
    • Add CustomRecovery builtin middleware (#2322)
    • binding: avoid 2038 problem on 32-bit architectures (#2450)
    • Prevent panic in Context.GetQuery() when there is no Request (#2412)
    • Add GetUint and GetUint64 method on gin.context (#2487)
    • update content-disposition header to MIME-style (#2512)
    • reduce allocs and improve the render WriteString (#2508)
    • implement ".Unwrap() error" on Error type (#2525) (#2526)
    • Allow bind with a map[string]string (#2484)
    • chore: update tree (#2371)
    • Support binding for slice/array obj [Rewrite] (#2302)
    • basic auth: fix timing oracle (#2609)
    • Add mixed param and non-param paths (port of httprouter#329) (#2663)
    • feat(engine): add trustedproxies and remoteIP (#2632)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • support set ping handler and pong handler

    support set ping handler and pong handler

    first of all, thanks this good project, we are preparing a tool based on this project.

    Sometimes i need do something while receive ping or pong message. So I added this feature, is it alright

    opened by qcha0 0
  • close pong channel after ping

    close pong channel after ping

    should close pong channel after ping

    opened by qcha0 0
  • Use net.ErrClosed

    Use net.ErrClosed

    Go 1.16 has introduced net.ErrClosed, which should be returned/wrapped when an I/O call is performed on a network connection which has already been closed. This is useful to avoid cluttering logs with messages like "failed to close WebSocket: already wrote close".

    Closes: https://github.com/nhooyr/websocket/issues/286

    opened by emersion 12
Releases(v1.8.7)
  • v1.8.7(Apr 7, 2021)

  • v1.8.6(May 18, 2020)

    • Fix deadlock introduced in v1.8.5 #231
      • Occured when you'd write at the same time as close
    • Add support for gin-gonic/gin
    • wsjson does not require that the message type read is text anymore #233
    • Add automated test to echo example #224
    • Undeprecate InsecureSkipVerify #225
      • It's more clear than * as an origin pattern.

    In light of #231 and #205, I've opened #239 which will track a complete review to ensure there are no more such bugs from my rewrite in #163.

    Source code(tar.gz)
    Source code(zip)
  • v1.8.5(Apr 14, 2020)

    • Improve cross origin API and add example #194 #198
    • Add automated test for chat example #201
    • You can now pass http:// and https:// URLs to Dial
    • Documentation fixes #212 #208
    • Prevent all writes after close frame is written #213
    • Ensure writes on a closed connection return the close error #215
    • Disable compression for Safari due to bugs in its implementation #218
    Source code(tar.gz)
    Source code(zip)
  • v1.8.4(Feb 28, 2020)

  • v1.8.3(Feb 21, 2020)

  • v1.8.2(Feb 16, 2020)

  • v1.8.1(Feb 16, 2020)

  • v1.8.0(Feb 16, 2020)

  • v1.7.4(Nov 9, 2019)

    • Dramatically optimize WebSocket masking algorithm implementation #171
      • We are now 1.75x faster than gorilla/websocket and gobwas/ws all while using pure safe Go
      • Thanks @renthraysk
    Source code(tar.gz)
    Source code(zip)
  • v1.7.3(Nov 5, 2019)

  • v1.7.2(Oct 23, 2019)

  • v1.7.1(Oct 11, 2019)

    • Minor documentation improvements
    • Improved close handshake behaviour https://github.com/nhooyr/websocket/commit/bc4fce01803c504367a6996b2bb66aee1eb5a143
    • Removed the typescript CI in favour of make https://github.com/nhooyr/websocket/commit/4d4a02d4bf9b8336272f6dc075f0e0a77566192d
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Oct 9, 2019)

  • v1.6.5(Sep 29, 2019)

  • v1.6.4(Sep 27, 2019)

    • Fix improper use of sync/atomic on 32 bit systems causing panics #154
      • Thanks @andersfylling for reporting this issue.
    • Improve godoc and fix code style (#149, #150, #151)
      • Thanks @cristaloleg
    • Allows concurrent use of SetReadLimit in respect to the Read goroutine #154
      • Reasoning behind this change is that if you are handling messages async to the read goroutine, you might want to adjust the read limit in those instead co-ordinating explicitly with the read goroutine.
    Source code(tar.gz)
    Source code(zip)
  • v1.6.3(Sep 24, 2019)

  • v1.6.2(Sep 23, 2019)

  • v1.6.1(Sep 22, 2019)

  • v1.6.0(Sep 22, 2019)

  • v1.5.1(Sep 4, 2019)

  • v1.5.0(Sep 2, 2019)

    • Rewrote autobahn test suite in pure Go (#129)
      • The entire test suite now runs in 2.8s 🎉
    • Improved test coverage to 91% (#123, #126)
    • Modified NetConn wrapper to take context.Context as first argument (#131)
      • This is a breaking change but relatively minor so I don't think it's worth a major release.
    • Modified Dial/Accept to accept a pointer to option structs (#122, #123)
      • This is a breaking change but relatively minor so I don't think it's worth a major release.
    • Reduced Reader/Writer allocations to only 8 bytes (#116, #118)
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Aug 16, 2019)

  • v1.3.3(Aug 7, 2019)

  • v1.3.2(Jul 24, 2019)

  • v1.3.1(Jul 13, 2019)

  • v1.3.0(Jul 3, 2019)

  • v1.2.1(Jun 23, 2019)

  • v1.2.0(Jun 11, 2019)

  • v1.1.1(Jun 4, 2019)

  • v1.1.0(Jun 2, 2019)

Owner
Anmol Sethi
on a sabbatical, back soon :)
Anmol Sethi
Tiny WebSocket library for Go.

RFC6455 WebSocket implementation in Go.

Sergey Kamardin 4.2k Dec 3, 2021
A go library for consuming Binance Websocket Market Streams

binancestream A go library for consuming Binance Websocket Market Streams This library handles network failures by automatically reconnecting to the w

Yasin Özel 1 Nov 1, 2021
A fast, well-tested and widely used WebSocket implementation for Go.

Gorilla WebSocket Gorilla WebSocket is a Go implementation of the WebSocket protocol. Documentation API Reference Chat example Command example Client

Gorilla Web Toolkit 15.9k Nov 28, 2021
A modern, fast and scalable websocket framework with elegant API written in Go

About neffos Neffos is a cross-platform real-time framework with expressive, elegant API written in Go. Neffos takes the pain out of development by ea

Gerasimos (Makis) Maropoulos 374 Dec 3, 2021
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.

websocketd websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSoc

Joe Walnes 15.8k Nov 28, 2021
WebSocket Command Line Client written in Go

ws-cli WebSocket Command Line Client written in Go Installation go get github.com/kseo/ws-cli Usage $ ws-cli -url ws://echo.websocket.org connected (

Kwang Yul Seo 17 Nov 12, 2021
proxy your traffic through CDN using websocket

go-cdn2proxy proxy your traffic through CDN using websocket what does it do example server client thanks what does it do you can use this as a library

jm33-ng 32 Nov 11, 2021
Chat bots (& more) for Zoom by figuring out their websocket protocol

zoomer - Bot library for Zoom meetings Good bot support is part of what makes Discord so nice to use. Unfortunately, the official Zoom API is basicall

Christopher Tarry 40 Nov 23, 2021
Simple example for using Turbos Streams in Go with the Gorilla WebSocket toolkit.

Go Example for TurboStreams over WebSockets Simple example for using Turbos Streams in Go with the Gorilla WebSocket toolkit.

Jan Stamer 17 Oct 17, 2021
:notes: Minimalist websocket framework for Go

melody ?? Minimalist websocket framework for Go. Melody is websocket framework based on github.com/gorilla/websocket that abstracts away the tedious p

Ola 2.3k Dec 5, 2021
Terminal on browser via websocket

Terminal on browser via websocket. Supportted OS Linux Mac

skanehira 127 Nov 26, 2021
run shell scripts by websocket with go lauguage

go_shell_socket run shell scripts by websocket with go lauguage Usage pull project get gin and websocket with go get config config.json file build it

soQ 18 Nov 2, 2021
simpleChatInGo - This is a simple chat that i made for fun asnd learn more about websocket

simpleChatInGo This is a simple chat that i made for fun asnd learn more about websocket deploy For deploy this you only need to run the command : $ d

ranon rat 6 Aug 7, 2021
gatews - Gate.io WebSocket SDK

gatews - Gate.io WebSocket SDK gatews provides new Gate.io WebSocket V4 implementations. It is intended to work along with gateapi-* series to provide

gate.io 31 Nov 18, 2021
WebSocket for fasthttp

websocket WebSocket library for fasthttp and net/http. Checkout examples to inspire yourself. Install go get github.com/dgrr/websocket Why another Web

Darío 21 Nov 17, 2021
A tiny command line websocket client written in Go

wsc A simplistic tool for sending and receiving websocket messages from a command line. Mainly useful to test websocket servers. Getting started: $ go

Raphael Simon 48 Nov 12, 2021
An online multiplayer, websocket based, interpretation of the Tic Tac Toe minigame from "Machinarium" :D

Tik Tak Toe An interpretation of the tic tac toe minigame from Amanita Design's Machinarium, multiplayer, online, as a website. Here's a screenshot of

null 1 Oct 28, 2021
Simle websocket chat on Golang

WebsocketChat Simle websocket chat on Golang Installation (with comiling binary files): cd projectDir/cmd/app/server - change current directory go bui

Boris 0 Nov 1, 2021
A websocket powered telegram wrapper for Sugaroid written in golang

sg-telegram A thin telegram wrapper built on top of Sugaroid Websocket

The Sugaroid Project 0 Nov 4, 2021