public Connection(Transport parent, Supervisor owner, SocketChannel channel) { this.parent = parent; this.owner = owner; this.socket = parent.createCryptoSocket(channel, true); server = true; owner.sessionInit(this); }
public Connection connect() { if (spec == null || spec.malformed()) { setLostReason(new IllegalArgumentException("jrt: malformed or missing spec")); return this; } try { socket = parent.createCryptoSocket(SocketChannel.open(spec.address()), false); } catch (Exception e) { setLostReason(e); } return this; }