blob: c244df981943bd9b9fac9d50ff99fa5abc0967cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# -*- frozen-string-literal: true -*-
using Plum::BinaryString
module Plum
class ClientConnection < Connection
def initialize(writer, local_settings = {})
super(writer, local_settings)
writer.call(CLIENT_CONNECTION_PREFACE)
settings(local_settings)
@state = :waiting_settings
end
# Create a new stream for HTTP request.
def open_stream
next_id = @max_stream_ids[1] + 2
stream(next_id)
end
end
end
|