Return the SocketChannel associated with this connection, if any. @return the SocketChannel @since JavaMail 1.5.2
()
| 544 | * @since JavaMail 1.5.2 |
| 545 | */ |
| 546 | public SocketChannel getChannel() { |
| 547 | SocketChannel ret = socket.getChannel(); |
| 548 | if (ret != null) |
| 549 | return ret; |
| 550 | |
| 551 | if (socket instanceof SSLSocket) { |
| 552 | ret = Protocol.findSocketChannel(socket); |
| 553 | } |
| 554 | return ret; |
| 555 | } |
| 556 | |
| 557 | /** |
| 558 | * Android is broken and SSL wrapped sockets don't delegate |
no test coverage detected