Skip to content

Commit

Permalink
feat: small socketio improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Dec 8, 2019
1 parent 3259cd7 commit b51b300
Show file tree
Hide file tree
Showing 6 changed files with 208 additions and 158 deletions.
1 change: 1 addition & 0 deletions api/calcapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ message SIO {
message Input {
string room = 1;
Peer peer = 2;
int32 max_log_entries = 3;
}
message Output {
repeated Peer peers = 1;
Expand Down
5 changes: 3 additions & 2 deletions cmd/calcbiz/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ func startHTTPServer(ctx context.Context, opts *serverOptions) error {
defer sio.Close()

zap.L().Info("starting HTTP server", zap.String("bind", opts.HTTPBind))
m := wsproxy.WebsocketProxy(r) // FIXME: with logger
return http.ListenAndServe(opts.HTTPBind, m)
var h http.Handler = r
h = wsproxy.WebsocketProxy(h) // FIXME: with logger
return http.ListenAndServe(opts.HTTPBind, h)
}

func startGRPCServer(ctx context.Context, opts *serverOptions) error {
Expand Down
2 changes: 1 addition & 1 deletion gen.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
2a6baa17ee56202e26ddfa73d57bc489403c07f2 ./api/calcapi.proto
431b63cd908588e398bbb94d1e642e585441099c ./api/dashboard.proto
47116fdc07405fe179dde05f858ac45e88647cfd ./api/calcapi.proto
5c613daf5318661d709f8766163ef986d885b72d Makefile
a0415fc5002d339337b03fe97801376ff3be3bbd ./api/crew.proto
ffa8325482af5c58dd816e9404f0226db0a1d7de ./api/soundcloud.proto
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.3.2
github.com/google/uuid v1.1.1 // indirect
github.com/googollee/go-engine.io v1.4.2 // indirect
github.com/googollee/go-engine.io v1.4.2
github.com/googollee/go-socket.io v1.4.2
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/gorilla/mux v1.7.3
Expand Down

0 comments on commit b51b300

Please sign in to comment.