8460: Merge branch 'master' into 8460-websocket-go
[arvados.git] / services / ws / session.go
index 9111c6cc2858eb9b94b47b765d54cb5f56977aa5..d469737bd8aab3a2357aa6e0984cc9a2202c3443 100644 (file)
@@ -1,10 +1,10 @@
 package main
 
 type session interface {
-       // Receive processes a message received from the client. If
-       // the returned response is non-nil, it will be queued and
-       // sent the client.
-       Receive(map[string]interface{}, []byte) []byte
+       // Receive processes a message received from the client. If a
+       // non-nil error is returned, the connection will be
+       // terminated.
+       Receive([]byte) error
 
        // Filter returns true if the event should be queued for
        // sending to the client. It should return as fast as
@@ -22,6 +22,4 @@ type session interface {
        // incoming events will be queued. If the event queue fills
        // up, the connection will be dropped.
        EventMessage(*event) ([]byte, error)
-
-       debugLogf(string, ...interface{})
 }