Mercurial > hg > Applications > TightVNC_orginal
comparison src/main/java/com/glavsoft/rfb/protocol/SenderTask.java @ 52:472a9bcacb21 draft default tip
TightVNC 2.7.1.0
author | you@cr.ie.u-ryukyu.ac.jp |
---|---|
date | Wed, 07 Aug 2013 19:01:17 +0900 |
parents | 4689cc86d6cb |
children |
comparison
equal
deleted
inserted
replaced
0:4689cc86d6cb | 52:472a9bcacb21 |
---|---|
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 // |
44 * Task runs as thread, receive messages from queue and sends them to writer. | 44 * Task runs as thread, receive messages from queue and sends them to writer. |
45 * When no messages appears in queue longer than timeout period, sends FramebufferUpdate | 45 * When no messages appears in queue longer than timeout period, sends FramebufferUpdate |
46 * request | 46 * request |
47 * @param messageQueue queue to poll messages | 47 * @param messageQueue queue to poll messages |
48 * @param writer writer to send messages out | 48 * @param writer writer to send messages out |
49 * @param protocolContext | 49 * @param protocolContext protocol |
50 */ | 50 */ |
51 public SenderTask(MessageQueue messageQueue, Writer writer, ProtocolContext protocolContext) { | 51 public SenderTask(MessageQueue messageQueue, Writer writer, ProtocolContext protocolContext) { |
52 this.queue = messageQueue; | 52 this.queue = messageQueue; |
53 this.writer = writer; | 53 this.writer = writer; |
54 this.protocolContext = protocolContext; | 54 this.protocolContext = protocolContext; |
65 message.send(writer); | 65 message.send(writer); |
66 } | 66 } |
67 } catch (InterruptedException e) { | 67 } catch (InterruptedException e) { |
68 // nop | 68 // nop |
69 } catch (TransportException e) { | 69 } catch (TransportException e) { |
70 Logger.getLogger("com.glavsoft.rfb.protocol").severe("Close session: " + e.getMessage()); | 70 Logger.getLogger(getClass().getName()).severe("Close session: " + e.getMessage()); |
71 if (isRunning) { | 71 if (isRunning) { |
72 protocolContext.cleanUpSession("Connection closed"); | 72 protocolContext.cleanUpSession("Connection closed"); |
73 } | 73 } |
74 stopTask(); | 74 stopTask(); |
75 } catch (Throwable te) { | 75 } catch (Throwable te) { |