Package ch.ethz.inf.vs.scandium.dtls

Examples of ch.ethz.inf.vs.scandium.dtls.DTLSMessage


   */
  public void close(InetSocketAddress peerAddress) {
    DTLSSession session = dtlsSessions.get(addressToKey(peerAddress));
   
    if (session != null) {
      DTLSMessage closeNotify = new AlertMessage(AlertLevel.WARNING, AlertDescription.CLOSE_NOTIFY);
     
      DTLSFlight flight = new DTLSFlight();
      flight.addMessage(new Record(ContentType.ALERT, session.getWriteEpoch(), session.getSequenceNumber(), closeNotify, session));
      flight.setRetransmissionNeeded(false);
     
View Full Code Here


           
            LOGGER.fine("Received CLOSE_NOTIFY from " + peerAddress.toString());
           
            // server must reply with CLOSE_NOTIFY
            if (!session.isClient()) {
              DTLSMessage closeNotify = new AlertMessage(AlertLevel.WARNING, AlertDescription.CLOSE_NOTIFY);
              flight = new DTLSFlight();
              flight.addMessage(new Record(ContentType.ALERT, session.getWriteEpoch(), session.getSequenceNumber(), closeNotify, session));
              flight.setRetransmissionNeeded(false);
            }
           
View Full Code Here

    } else {

      if (session.isActive()) {
        // session to peer is active, send encrypted message
        DTLSMessage fragment = new ApplicationMessage(message.getBytes());
        encryptedMessage = new Record(ContentType.APPLICATION_DATA, session.getWriteEpoch(), session.getSequenceNumber(), fragment, session);
       
      } else {
        // try resuming session
        handshaker = new ResumingClientHandshaker(peerAddress, message, session);
View Full Code Here

TOP

Related Classes of ch.ethz.inf.vs.scandium.dtls.DTLSMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.