Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(streamId uint32, cmd *commands.HttpCommand, initialSendWindowSize uint32, initialReceiveWindowSize uint32, out FlowControlledFrameWriter) *stream
Types ¶
type Stream ¶
type Stream interface { StreamId() uint32 GetState() streamstate.StreamState SetState(state streamstate.StreamState) RequestHeaders() []hpack.HeaderField // Get the received HTTP body (concatenated payloads of DATA frames). ResponseBody() []byte // With push promises it may happen that a stream is created before the client created an HttpRequest. // This method is for associating these streams with a request. // If the stream is already associated with a request, the method returns an error. AssociateWithCommand(cmd *commands.HttpCommand) error // SendFrame doesn't mean the frame is sent directly. // DATA frames can be postponed by flow control. // However, this method will return immediately, postponed frames will be cached and // handled under the hood as soon as a WINDOW_UPDATE is received. SendFrame(frame frames.Frame) // Handle a received frame for this stream. ReceiveFrame(frame frames.Frame) // Send RST_STREAM CloseWithError(errorCode frames.ErrorCode, msg string) // Called by the connection if a WINDOW_UPDATE for the connection is received. ProcessPendingDataFrames() }
Click to show internal directories.
Click to hide internal directories.