Skip to content

Commit bd8a5ef

Browse files
committed
revert to the version i need
1 parent f6591dc commit bd8a5ef

File tree

194 files changed

+16705
-18576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+16705
-18576
lines changed

.gitignore

-4
This file was deleted.

.idea/go-engine.io.iml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Build.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+103
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
sudo: false
21
language: go
3-
env:
4-
- GO111MODULE=on
5-
go:
6-
- master
7-
- tip
2+
go: 1.5
83
install:
9-
- go get
4+
- go get "github.com/smartystreets/goconvey/convey"
5+
- go get -v .
106
script:
11-
- make test
12-
- ./gosweep.sh
7+
- go test -race -v ./...

Makefile

-11
This file was deleted.

README.md

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# go-engine.io
22

3-
[![GoDoc](http://godoc.org/github.com/googollee/go-engine.io?status.svg)](http://godoc.org/github.com/googollee/go-engine.io) [![Build Status](https://travis-ci.org/googollee/go-engine.io.svg)](https://travis-ci.org/googollee/go-engine.io)
4-
[![Coverage Status](https://coveralls.io/repos/github/googollee/go-engine.io/badge.svg?branch=v1.4)](https://coveralls.io/github/googollee/go-engine.io?branch=v1.4)
3+
[![GoDoc](http://godoc.org/github.com/bitflipsoftware/go-engine.io?status.svg)](http://godoc.org/github.com/bitflipsoftware/go-engine.io) [![Build Status](https://travis-ci.org/googollee/go-engine.io.svg)](https://travis-ci.org/googollee/go-engine.io)
54

65
go-engine.io is the implement of engine.io in golang, which is transport-based cross-browser/cross-device bi-directional communication layer for [go-socket.io](https://github.com/googollee/go-socket.io).
76

@@ -12,13 +11,13 @@ It is compatible with node.js implement, and supported long-polling and websocke
1211
Install the package with:
1312

1413
```bash
15-
go get github.com/googollee/go-engine.io@v1
14+
go get github.com/bitflipsoftware/go-engine.io
1615
```
1716

1817
Import it with:
1918

2019
```go
21-
import "github.com/googollee/go-engine.io"
20+
import "github.com/bitflipsoftware/go-engine.io"
2221
```
2322

2423
and use `engineio` as the package name inside the code.
@@ -36,36 +35,44 @@ import (
3635
"log"
3736
"net/http"
3837

39-
"github.com/googollee/go-engine.io"
38+
"github.com/bitflipsoftware/go-engine.io"
4039
)
4140

4241
func main() {
43-
server, _ := engineio.NewServer(nil)
42+
server, err := engineio.NewServer(nil)
43+
if err != nil {
44+
log.Fatal(err)
45+
}
4446

4547
go func() {
4648
for {
4749
conn, _ := server.Accept()
4850
go func() {
4951
defer conn.Close()
50-
for {
52+
for i := 0; i < 10; i++ {
5153
t, r, _ := conn.NextReader()
5254
b, _ := ioutil.ReadAll(r)
5355
r.Close()
54-
56+
if t == engineio.MessageText {
57+
log.Println(t, string(b))
58+
} else {
59+
log.Println(t, hex.EncodeToString(b))
60+
}
5561
w, _ := conn.NextWriter(t)
56-
w.Write(b)
62+
w.Write([]byte("pong"))
5763
w.Close()
5864
}
5965
}()
6066
}
6167
}()
6268

6369
http.Handle("/engine.io/", server)
70+
http.Handle("/", http.FileServer(http.Dir("./asset")))
6471
log.Println("Serving at localhost:5000...")
6572
log.Fatal(http.ListenAndServe(":5000", nil))
6673
}
6774
```
6875

6976
## License
7077

71-
The 3-clause BSD License - see LICENSE for more details
78+
The 3-clause BSD License - see LICENSE for more details

base.go

-34
This file was deleted.

0 commit comments

Comments
 (0)