Beispiel #1
0
 public void readConnectionPreface()
 {
   if (this.client) {
     return;
   }
   uj localuj = this.source.ᗮ(Http2.CONNECTION_PREFACE.size());
   if (Http2.logger.isLoggable(Level.FINE)) {
     Http2.logger.fine(String.format("<< CONNECTION %s", new Object[] { localuj.el() }));
   }
   if (!Http2.CONNECTION_PREFACE.equals(localuj)) {
     throw Http2.ioException("Expected a connection header but was %s", new Object[] { localuj.ei() });
   }
 }
Beispiel #2
0
 public void connectionPreface()
 {
   try
   {
     if (this.closed) {
       throw new IOException("closed");
     }
     if (!this.client) {
       return;
     }
     if (Http2.logger.isLoggable(Level.FINE)) {
       Http2.logger.fine(String.format(">> CONNECTION %s", new Object[] { Http2.CONNECTION_PREFACE.el() }));
     }
     this.sink.ᐧ(Http2.CONNECTION_PREFACE.toByteArray());
     this.sink.flush();
     return;
   }
   finally {}
 }