Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: remoting/proto/mux.proto

Issue 10830046: Implement ChannelMultiplexer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Protocol for the mux channel that multiplexes multiple channels.
6
7 syntax = "proto2";
8
9 option optimize_for = LITE_RUNTIME;
10
11 package remoting.protocol;
12
13 message MuxPacket {
Wez 2012/08/06 23:14:07 nit: MultiplexPacket
Sergey Ulanov 2012/08/07 20:12:22 Done.
14 // Channel ID. Each peer choses this value when it sends first packet to
15 // the other peer. It unique identified channel this packet belongs to.
16 // Channel ID is direction-specific, i.e. each channel has two IDs
17 // assigned to it: one for receiving and one for sending. E.g. if peer A
18 // assigns ID 1 to a channel and peer B assigns ID 3 to the same channel
19 // then packets sent for that channel from A to B will have id=1, while
20 // packets sent from B to A will have id=3. Both peers need to keep track
21 // of both values.
Wez 2012/08/06 23:14:07 nit: I don't think you need the example here; it's
Wez 2012/08/06 23:14:07 nit: The downside to this approach is that receive
Sergey Ulanov 2012/08/07 20:12:22 Done.
Sergey Ulanov 2012/08/07 20:12:22 It would make protocol more complicated if the IDs
22 optional int32 channel_id = 1;
23
24 // Channel name. The name is used to identify channels before channel ID
25 // is assigned in the first message. This value must be included only
26 // in the first packet for a given channel. All other packets must be
27 // identified using channel ID.
28 optional string channel_name = 2;
29
30 optional bytes data = 3;
Wez 2012/08/06 23:14:07 What is the overhead to copying the actual message
Sergey Ulanov 2012/08/07 20:12:22 I don't think it's big enough to worry about since
Sergey Ulanov 2012/08/07 20:13:58 I meant it would _not_ require changing on-wire fo
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698