Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Sep 23, 2019
1 parent 8472288 commit ae712da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gnet-echo-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func main() {
return
}
events.React = func(c gnet.Conn) (out []byte, action gnet.Action) {
top, tail := c.ReadAll()
top, tail := c.ReadPair()
out = append(top, tail...)
c.ResetBuffer()
if trace {
Expand Down
2 changes: 1 addition & 1 deletion gnet-http-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
//}

events.React = func(c gnet.Conn) (out []byte, action gnet.Action) {
top, tail := c.ReadAll()
top, tail := c.ReadPair()
data := append(top, tail...)
if noparse && bytes.Contains(data, []byte("\r\n\r\n")) {
// for testing minimal single packet request -> response.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kavu/go_reuseport v1.4.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/panjf2000/gnet v0.1.2-0.20190922124057-ff1552341134
github.com/panjf2000/gnet v0.1.2-0.20190923031043-bceaf0be917f
github.com/stretchr/testify v1.4.0 // indirect
github.com/tidwall/evio v1.0.2
github.com/valyala/fasthttp v1.5.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ github.com/panjf2000/gnet v0.1.2-0.20190922090419-f2cf65bdf087 h1:A44RYUWRc4rRV4
github.com/panjf2000/gnet v0.1.2-0.20190922090419-f2cf65bdf087/go.mod h1:N251s4H0wuPrB0ssD/D4ZQYOFJKZOwYxqIejzAodQqc=
github.com/panjf2000/gnet v0.1.2-0.20190922124057-ff1552341134 h1:wCCmFSQpZcxZi4YNd7XWL2+UpQ1/ZoZphNA9lC99nNc=
github.com/panjf2000/gnet v0.1.2-0.20190922124057-ff1552341134/go.mod h1:N251s4H0wuPrB0ssD/D4ZQYOFJKZOwYxqIejzAodQqc=
github.com/panjf2000/gnet v0.1.2-0.20190923031043-bceaf0be917f h1:vSpN7hmS3qjPPJpaivVBo1EGp1Cgg/AT3P8pDne6Ox4=
github.com/panjf2000/gnet v0.1.2-0.20190923031043-bceaf0be917f/go.mod h1:N251s4H0wuPrB0ssD/D4ZQYOFJKZOwYxqIejzAodQqc=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down

0 comments on commit ae712da

Please sign in to comment.