8460: Reply to unparsable messages with status:400.
[arvados.git] / services / ws / session.go
index a0658d964cb8d2b97e32e83c22dc39370813fad5..d469737bd8aab3a2357aa6e0984cc9a2202c3443 100644 (file)
@@ -1,10 +1,10 @@
 package main
 
 type session interface {
-       // Receive processes a message received from the client. If
-       // the returned list of messages is non-nil, they will be
-       // queued for sending to 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{})
 }