Mercurial > hg > Database > Alice
view src/main/java/alice/daemon/OutboundTcpConnection.java @ 629:d0d1cd3dfc11 dispose
fix UDP conection
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 14 Sep 2017 20:04:48 +0900 |
parents | bfec2c3ff1b8 |
children | bd245df5cba3 646f705e65b1 |
line wrap: on
line source
package alice.daemon; import alice.datasegment.Command; public class OutboundTcpConnection extends Thread { public Connection connection; public OutboundTcpConnection(Connection connection) { this.connection = connection; } /** * pipeline thread for transmission */ public void run() { while (true) { try { Command cmd = connection.sendQueue.take(); switch (cmd.type) { case CLOSE: connection.close(); return; case FINISH: System.exit(0); return; default: break; } connection.write(cmd);//ここでconvert()がよばれてる } catch (InterruptedException e) { e.printStackTrace(); } } } }