codemp-proto 0.8.0

protocol definitions for codemp -- code multiplexer
Documentation
syntax = "proto2";

import "common.proto";

package buffer;

// Handles buffer changes and keeps users in sync.
service Buffer {
	// Attach to a buffer and receive operations.
	rpc Attach (stream Operation) returns (stream BufferEvent);
	// Kicks all active users from the buffer.
	rpc KickAll (common.Empty) returns (common.Empty);
}

// Message representing an operation that has occurred.
message Operation {
	// The data of this operation.
	required bytes data = 1;
}

// Message representing an event that happened in a buffer.
message BufferEvent {
	// The operation that occurred.
	required Operation op = 1;
	// The user that sent this event.
	required common.Identifier user = 2;
}