Added handling of the "slot" field in SYN_STREAM frames.

Modified parser and generator, and the session implementation
for now ignores this field.
This commit is contained in:
Simone Bordet 2012-06-01 19:05:25 +02:00
parent 70e4a103ec
commit f872676a65
3 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ public class ClosedStreamTest extends AbstractTest
final Generator generator = new Generator(new StandardByteBufferPool(),new StandardCompressionFactory().newCompressor());
int streamId = 1;
ByteBuffer synData = generator.control(new SynStreamFrame(version,SynInfo.FLAG_CLOSE, streamId,0,(byte)0,new Headers()));
ByteBuffer synData = generator.control(new SynStreamFrame(version,SynInfo.FLAG_CLOSE, streamId,0,(byte)0,(short)0,new Headers()));
final SocketChannel socketChannel = SocketChannel.open(startServer);
socketChannel.write(synData);
@ -261,7 +261,7 @@ public class ClosedStreamTest extends AbstractTest
Assert.assertThat(buffer.hasRemaining(), is(false));
assertThat("GoAway frame is received by server", goAwayReceivedLatch.await(5,TimeUnit.SECONDS), is(true));
socketChannel.close();
}
}

View File

@ -414,7 +414,7 @@ public class PushStreamTest extends AbstractTest
final SocketChannel channel = SocketChannel.open(serverAddress);
final Generator generator = new Generator(new StandardByteBufferPool(),new StandardCompressionFactory.StandardCompressor());
int streamId = 1;
ByteBuffer writeBuffer = generator.control(new SynStreamFrame(version,(byte)0,streamId,0,(byte)0,new Headers()));
ByteBuffer writeBuffer = generator.control(new SynStreamFrame(version,(byte)0,streamId,0,(byte)0,(short)0,new Headers()));
channel.write(writeBuffer);
assertThat("writeBuffer is fully written",writeBuffer.hasRemaining(), is(false));

View File

@ -44,7 +44,7 @@ public class UnsupportedVersionTest extends AbstractTest
}
});
SynStreamFrame frame = new SynStreamFrame(SPDY.V2, SynInfo.FLAG_CLOSE, 1, 0, (byte)0, new Headers());
SynStreamFrame frame = new SynStreamFrame(SPDY.V2, SynInfo.FLAG_CLOSE, 1, 0, (byte)0, (short)0, new Headers());
Generator generator = new Generator(new StandardByteBufferPool(), new StandardCompressionFactory.StandardCompressor());
ByteBuffer buffer = generator.control(frame);
// Replace the version byte with an unsupported version