comparison src/myVncProxy/MyRfbProto.java @ 58:39741f18b4f2

modify MyRfbProto.java. remove unnecessary method
author e085711
date Fri, 08 Jul 2011 18:20:35 +0900
parents 796f2b3b8665
children 3ccedb44aaa0
comparison
equal deleted inserted replaced
57:a60ec7414931 58:39741f18b4f2
250 250
251 void sendInitData(OutputStream os) throws IOException { 251 void sendInitData(OutputStream os) throws IOException {
252 os.write(initData); 252 os.write(initData);
253 } 253 }
254 254
255 void sendData(byte b[]) {
256 try {
257 multicastqueue.put(b);
258
259 /*
260 * // for(Socket cli : cliList){ // try{ //
261 * cli.getOutputStream().write(b, 0, b.length); //
262 * }catch(IOException e){ // // if socket closed //
263 * cliList.remove(cli); // } // }
264 */
265 // System.out.println("cliSize="+cliSize());
266 } catch (Exception e) {
267 }
268 }
269
270 void sendPngImage() { 255 void sendPngImage() {
271 try { 256 try {
272 for (Socket cli : cliListTmp) { 257 for (Socket cli : cliListTmp) {
273 try { 258 try {
274 sendPngData(cli); 259 sendPngData(cli);
295 280
296 void printNumBytesRead() { 281 void printNumBytesRead() {
297 System.out.println("numBytesRead=" + numBytesRead); 282 System.out.println("numBytesRead=" + numBytesRead);
298 } 283 }
299 284
300 void bufResetSend(int size) throws IOException {
301 reset();
302 int len = size;
303 if (available() < size)
304 len = available();
305 byte buffer[] = new byte[len];
306 readFully(buffer);
307 sendData(buffer);
308 }
309
310 void readSendData() throws IOException { 285 void readSendData() throws IOException {
311 byte buffer[] = new byte[dataLen]; 286 byte buffer[] = new byte[dataLen];
312 readFully(buffer); 287 readFully(buffer);
313 reset(); 288 reset();
314 289 multicastqueue.put(buffer);
290 /*
291
315 for (Socket cli : cliList) { 292 for (Socket cli : cliList) {
316 try { 293 try {
317 OutputStream out = cli.getOutputStream(); 294 OutputStream out = cli.getOutputStream();
318 executor.execute(new SendThread(out, buffer)); 295 executor.execute(new SendThread(out, buffer));
319 } catch (IOException e) { 296 } catch (IOException e) {
320 // if client socket closed 297 // if client socket closed
321 cliListTmp.remove(cli); 298 cliListTmp.remove(cli);
322 } catch (Exception e) { 299 } catch (Exception e) {
323 300
324 } 301 }
325 302 }
326 } 303 */
327 } 304 }
328 305
329 void regiFramebufferUpdate() throws IOException { 306 void regiFramebufferUpdate() throws IOException {
330 mark(20); 307 mark(20);
331 messageType = readU8(); 308 messageType = readU8();