Mercurial > hg > Database > Alice
comparison src/main/java/alice/daemon/AcceptThread.java @ 543:f3f7e256ee03 dispose
add AliceDaemon on paramater
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 03 Aug 2015 20:00:53 +0900 |
parents | bd245df5cba3 |
children |
comparison
equal
deleted
inserted
replaced
542:bd245df5cba3 | 543:f3f7e256ee03 |
---|---|
29 socket.setTcpNoDelay(true); | 29 socket.setTcpNoDelay(true); |
30 log.info("Accept " + socket.getInetAddress().getHostName() + ":" + socket.getPort()); | 30 log.info("Accept " + socket.getInetAddress().getHostName() + ":" + socket.getPort()); |
31 Connection connection = new Connection(socket, alice); | 31 Connection connection = new Connection(socket, alice); |
32 String key = "accept" + counter; | 32 String key = "accept" + counter; |
33 IncomingTcpConnection in = | 33 IncomingTcpConnection in = |
34 new IncomingTcpConnection(connection, alice.dataSegment.get("local"), key); | 34 new IncomingTcpConnection(connection, alice.dataSegment.get("local"), key, alice); |
35 in.setName(connection.getInfoString()+"-IncomingTcp"); | 35 in.setName(connection.getInfoString()+"-IncomingTcp"); |
36 in.start(); | 36 in.start(); |
37 alice.dataSegment.setAccept(key, in); | 37 alice.dataSegment.setAccept(key, in); |
38 OutboundTcpConnection out = new OutboundTcpConnection(connection); | 38 OutboundTcpConnection out = new OutboundTcpConnection(connection); |
39 out.setName(connection.getInfoString()+"-OutboundTcp"); | 39 out.setName(connection.getInfoString()+"-OutboundTcp"); |