blob: 24d47567ec3452b81b075aa61dbfab4e93847bad [file] [log] [blame]
Constantin Kaplinsky2844fd52008-04-14 08:02:25 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
DRCc5dc0382011-05-13 21:42:14 +000019package com.tigervnc.rfb;
Constantin Kaplinsky90d8a502008-04-14 09:45:50 +000020
DRCc5dc0382011-05-13 21:42:14 +000021import com.tigervnc.rdr.*;
Constantin Kaplinsky2844fd52008-04-14 08:02:25 +000022
DRCc5dc0382011-05-13 21:42:14 +000023public class CMsgWriterV3 extends CMsgWriter {
24
25 public CMsgWriterV3(ConnParams cp_, OutStream os_) { super(cp_, os_); }
26
27 public void writeClientInit(boolean shared) {
28 os.writeU8(shared?1:0);
29 endMsg();
Constantin Kaplinsky2844fd52008-04-14 08:02:25 +000030 }
31
DRCc5dc0382011-05-13 21:42:14 +000032 public void startMsg(int type) {
33 os.writeU8(type);
34 }
Constantin Kaplinsky2844fd52008-04-14 08:02:25 +000035
DRCc5dc0382011-05-13 21:42:14 +000036 public void endMsg() {
37 os.flush();
Constantin Kaplinsky2844fd52008-04-14 08:02:25 +000038 }
39}