Code example for SocketChannel

Methods: socket

0
     * @param key the Selection key provided by the {@link Selector}. 
     * @throws ICPException 
     */ 
    @Override 
     void init(SocketChannel channel) throws ICPException {
        super.init(channel);
        if (log.isLoggable(Level.FINE)) {
            log.fine("initialize ssl tooling");
        } 
        helper = new SSLEngineHelper(getRemoteHost(), channel.socket().getPort(), this);
        addBufferTransformer(helper);
    } 
 
    /** 
     * first try to send ssl close packet, then close channel 
     * @throws IOException 
     */ 
    @Override 
    public void close() throws IOException { 
 
        try {