java - Smtp server issue starttls command to sslsocket but when startHandshake() read time out -
public static socket createssl(socket socket) throws ioexception { sslsocketfactory factory = (sslsocketfactory) sslsocketfactory.getdefault(); sslsocket sslsocket = (sslsocket) (factory.createsocket(socket, socket .getinetaddress().gethostaddress(), socket.getport(), true)); sslsocket.setuseclientmode(false); sslsocket.starthandshake(); return sslsocket; }
the sslsocket read time out when sslsocket.starthandshake(), should solve problem?
Comments
Post a Comment