Mercurial > hg > Applications > TreeVNC
comparison src/main/java/com/glavsoft/rfb/protocol/state/InitState.java @ 57:17b702648079
version2.7.2 original version.
author | Taninari YU <you@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 15 Dec 2013 18:04:03 +0900 |
parents | 4689cc86d6cb |
children | 433c79184c05 |
comparison
equal
deleted
inserted
replaced
0:4689cc86d6cb | 57:17b702648079 |
---|---|
1 // Copyright (C) 2010, 2011 GlavSoft LLC. | 1 // Copyright (C) 2010, 2011, 2012, 2013 GlavSoft LLC. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 //------------------------------------------------------------------------- | 4 //------------------------------------------------------------------------- |
5 // This file is part of the TightVNC software. Please visit our Web site: | 5 // This file is part of the TightVNC software. Please visit our Web site: |
6 // | 6 // |
30 import com.glavsoft.exceptions.UnsupportedProtocolVersionException; | 30 import com.glavsoft.exceptions.UnsupportedProtocolVersionException; |
31 import com.glavsoft.exceptions.UnsupportedSecurityTypeException; | 31 import com.glavsoft.exceptions.UnsupportedSecurityTypeException; |
32 import com.glavsoft.rfb.encoding.ServerInitMessage; | 32 import com.glavsoft.rfb.encoding.ServerInitMessage; |
33 import com.glavsoft.rfb.protocol.ProtocolContext; | 33 import com.glavsoft.rfb.protocol.ProtocolContext; |
34 import com.glavsoft.rfb.protocol.ProtocolSettings; | 34 import com.glavsoft.rfb.protocol.ProtocolSettings; |
35 | |
36 import java.util.logging.Logger; | |
35 | 37 |
36 /** | 38 /** |
37 * ClientInit | 39 * ClientInit |
38 * | 40 * |
39 * Once the client and server are sure that they're happy to talk to one | 41 * Once the client and server are sure that they're happy to talk to one |
77 protected void completeContextData(ServerInitMessage serverInitMessage) { | 79 protected void completeContextData(ServerInitMessage serverInitMessage) { |
78 context.setPixelFormat(serverInitMessage.getPixelFormat()); | 80 context.setPixelFormat(serverInitMessage.getPixelFormat()); |
79 context.setFbWidth(serverInitMessage.getFrameBufferWidth()); | 81 context.setFbWidth(serverInitMessage.getFrameBufferWidth()); |
80 context.setFbHeight(serverInitMessage.getFrameBufferHeight()); | 82 context.setFbHeight(serverInitMessage.getFrameBufferHeight()); |
81 context.setRemoteDesktopName(serverInitMessage.getName()); | 83 context.setRemoteDesktopName(serverInitMessage.getName()); |
82 logger.fine(serverInitMessage.toString()); | 84 Logger.getLogger(getClass().getName()).fine(serverInitMessage.toString()); |
83 } | 85 } |
84 | 86 |
85 protected ServerInitMessage getServerInitMessage() throws TransportException { | 87 protected ServerInitMessage getServerInitMessage() throws TransportException { |
86 writer.write(context.getSettings().getSharedFlag()); | 88 writer.write(context.getSettings().getSharedFlag()); |
87 ServerInitMessage serverInitMessage = new ServerInitMessage(reader); | 89 return new ServerInitMessage(reader); |
88 return serverInitMessage; | |
89 } | 90 } |
90 | 91 |
91 | 92 |
92 } | 93 } |