forked from mirror/websocket
fix repos
This commit is contained in:
parent
76ecc29eff
commit
9204c968d1
|
@ -17,7 +17,7 @@ jobs:
|
|||
default: ""
|
||||
docker:
|
||||
- image: "cimg/go:<< parameters.version >>"
|
||||
working_directory: /home/circleci/project/go/src/github.com/gorilla/websocket
|
||||
working_directory: /home/circleci/project/go/src/git.internal/re/websocket
|
||||
environment:
|
||||
GO111MODULE: "on"
|
||||
GOPROXY: "<< parameters.goproxy >>"
|
||||
|
|
16
README.md
16
README.md
|
@ -1,6 +1,6 @@
|
|||
# Gorilla WebSocket
|
||||
|
||||
[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket)
|
||||
[![GoDoc](https://godoc.org/git.internal/re/websocket?status.svg)](https://godoc.org/git.internal/re/websocket)
|
||||
[![CircleCI](https://circleci.com/gh/gorilla/websocket.svg?style=svg)](https://circleci.com/gh/gorilla/websocket)
|
||||
|
||||
Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
|
||||
|
@ -14,11 +14,11 @@ Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
|
|||
|
||||
### Documentation
|
||||
|
||||
* [API Reference](https://pkg.go.dev/github.com/gorilla/websocket?tab=doc)
|
||||
* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat)
|
||||
* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command)
|
||||
* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo)
|
||||
* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch)
|
||||
* [API Reference](https://pkg.go.dev/git.internal/re/websocket?tab=doc)
|
||||
* [Chat example](https://git.internal/re/websocket/tree/master/examples/chat)
|
||||
* [Command example](https://git.internal/re/websocket/tree/master/examples/command)
|
||||
* [Client and server example](https://git.internal/re/websocket/tree/master/examples/echo)
|
||||
* [File watch example](https://git.internal/re/websocket/tree/master/examples/filewatch)
|
||||
|
||||
### Status
|
||||
|
||||
|
@ -28,11 +28,11 @@ package API is stable.
|
|||
|
||||
### Installation
|
||||
|
||||
go get github.com/gorilla/websocket
|
||||
go get git.internal/re/websocket
|
||||
|
||||
### Protocol Compliance
|
||||
|
||||
The Gorilla WebSocket package passes the server tests in the [Autobahn Test
|
||||
Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn
|
||||
subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn).
|
||||
subdirectory](https://git.internal/re/websocket/tree/master/examples/autobahn).
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
var upgrader = websocket.Upgrader{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Chat Example
|
||||
|
||||
This application shows how to use the
|
||||
[websocket](https://github.com/gorilla/websocket) package to implement a simple
|
||||
[websocket](https://git.internal/re/websocket) package to implement a simple
|
||||
web chat application.
|
||||
|
||||
## Running the example
|
||||
|
@ -13,8 +13,8 @@ development environment.
|
|||
Once you have Go up and running, you can download, build and run the example
|
||||
using the following commands.
|
||||
|
||||
$ go get github.com/gorilla/websocket
|
||||
$ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/chat`
|
||||
$ go get git.internal/re/websocket
|
||||
$ cd `go list -f '{{.Dir}}' git.internal/re/websocket/examples/chat`
|
||||
$ go run *.go
|
||||
|
||||
To use the chat example, open http://localhost:8080/ in your browser.
|
||||
|
@ -38,7 +38,7 @@ sends them to the hub.
|
|||
### Hub
|
||||
|
||||
The code for the `Hub` type is in
|
||||
[hub.go](https://github.com/gorilla/websocket/blob/master/examples/chat/hub.go).
|
||||
[hub.go](https://git.internal/re/websocket/blob/master/examples/chat/hub.go).
|
||||
The application's `main` function starts the hub's `run` method as a goroutine.
|
||||
Clients send requests to the hub using the `register`, `unregister` and
|
||||
`broadcast` channels.
|
||||
|
@ -57,7 +57,7 @@ unregisters the client and closes the websocket.
|
|||
|
||||
### Client
|
||||
|
||||
The code for the `Client` type is in [client.go](https://github.com/gorilla/websocket/blob/master/examples/chat/client.go).
|
||||
The code for the `Client` type is in [client.go](https://git.internal/re/websocket/blob/master/examples/chat/client.go).
|
||||
|
||||
The `serveWs` function is registered by the application's `main` function as
|
||||
an HTTP handler. The handler upgrades the HTTP connection to the WebSocket
|
||||
|
@ -73,7 +73,7 @@ Finally, the HTTP handler calls the client's `readPump` method. This method
|
|||
transfers inbound messages from the websocket to the hub.
|
||||
|
||||
WebSocket connections [support one concurrent reader and one concurrent
|
||||
writer](https://godoc.org/github.com/gorilla/websocket#hdr-Concurrency). The
|
||||
writer](https://godoc.org/git.internal/re/websocket#hdr-Concurrency). The
|
||||
application ensures that these concurrency requirements are met by executing
|
||||
all reads from the `readPump` goroutine and all writes from the `writePump`
|
||||
goroutine.
|
||||
|
@ -85,7 +85,7 @@ network.
|
|||
|
||||
## Frontend
|
||||
|
||||
The frontend code is in [home.html](https://github.com/gorilla/websocket/blob/master/examples/chat/home.html).
|
||||
The frontend code is in [home.html](https://git.internal/re/websocket/blob/master/examples/chat/home.html).
|
||||
|
||||
On document load, the script checks for websocket functionality in the browser.
|
||||
If websocket functionality is available, then the script opens a connection to
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,8 +4,8 @@ This example connects a websocket connection to stdin and stdout of a command.
|
|||
Received messages are written to stdin followed by a `\n`. Each line read from
|
||||
standard out is sent as a message to the client.
|
||||
|
||||
$ go get github.com/gorilla/websocket
|
||||
$ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command`
|
||||
$ go get git.internal/re/websocket
|
||||
$ cd `go list -f '{{.Dir}}' git.internal/re/websocket/examples/command`
|
||||
$ go run main.go <command and arguments to run>
|
||||
# Open http://localhost:8080/ .
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
"os/signal"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
var addr = flag.String("addr", "localhost:8080", "http service address")
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
var addr = flag.String("addr", "localhost:8080", "http service address")
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
This example sends a file to the browser client for display whenever the file is modified.
|
||||
|
||||
$ go get github.com/gorilla/websocket
|
||||
$ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch`
|
||||
$ go get git.internal/re/websocket
|
||||
$ cd `go list -f '{{.Dir}}' git.internal/re/websocket/examples/filewatch`
|
||||
$ go run main.go <name of file to watch>
|
||||
# Open http://localhost:8080/ .
|
||||
# Modify the file to see it update in the browser.
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"git.internal/re/websocket"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -143,7 +143,7 @@ func serveHome(w http.ResponseWriter, r *http.Request) {
|
|||
p = []byte(err.Error())
|
||||
lastMod = time.Unix(0, 0)
|
||||
}
|
||||
var v = struct {
|
||||
v := struct {
|
||||
Host string
|
||||
Data string
|
||||
LastMod string
|
||||
|
|
Loading…
Reference in New Issue