System.Net.ServerSentEvents
Provides a parser for server-sent events information.
Specifies the type of data parsed from an event.
Carriage Return.
Line Feed.
Carriage Return Line Feed.
The default size of an ArrayPool buffer to rent.
Larger size used by default to minimize number of reads. Smaller size used in debug to stress growth/shifting logic.
The stream to be parsed.
The parser delegate used to transform bytes into a .
Indicates whether the enumerable has already been used for enumeration.
Buffer, either empty or rented, containing the data being read from the stream while looking for the next line.
The starting offset of valid data in .
The length of valid data in , starting from .
The index in where a newline ('\r', '\n', or "\r\n") was found.
The index in of characters already checked for newlines.
This is to avoid O(LineLength^2) behavior in the rare case where we have long lines that are built-up over multiple reads.
We want to avoid re-checking the same characters we've already checked over and over again.
Set when eof has been reached in the stream.
Rented buffer containing buffered data for the next event.
The length of valid data in , starting from index 0.
Whether data has been appended to .
This can be different than != 0 if empty data was appended.
The event type for the next event.
Initialize the enumerable.
The stream to parse.
The function to use to parse payload bytes into a .
Gets an enumerable of the server-sent events from this parser.
The parser has already been enumerated. Such an exception may propagate out of a call to .
Gets an asynchronous enumerable of the server-sent events from this parser.
The cancellation token to use to cancel the enumeration.
The parser has already been enumerated. Such an exception may propagate out of a call to .
The enumeration was canceled. Such an exception may propagate out of a call to .
Gets the next index and length with which to perform a newline search.
If there's no room remaining in the line buffer, either shifts the contents
left or grows the buffer in order to make room for the next read.
Processes a complete line from the SSE stream.
The parsed item if the method returns true.
How many characters to advance in the line buffer.
true if an SSE item was successfully parsed; otherwise, false.
Gets the last event ID.
This value is updated any time a new last event ID is parsed. It is not reset between SSE items.
Gets the reconnection interval.
If no retry event was received, this defaults to , and it will only
ever be in that situation. If a client wishes to retry, the server-sent
events specification states that the interval may then be decided by the client implementation and should be a
few seconds.
Transitions the object to a used state, throwing if it's already been used.
Reads data from the stream into the line buffer.
Reads data asynchronously from the stream into the line buffer.
Gets the UTF8 BOM.
Called at the beginning of processing to skip over an optional UTF8 byte order mark.
Grows the buffer, returning the existing one to the ArrayPool and renting an ArrayPool replacement.
Represents a server-sent event.
Specifies the type of data payload in the event.
Initializes the server-sent event.
The event's payload.
The event's type.
Gets the event's payload.
Gets the event's type.
Encapsulates a method for parsing the bytes payload of a server-sent event.
Specifies the type of the return value of the parser.
The event's type.
The event's payload bytes.
The parsed .
Provides a parser for parsing server-sent events.
The default ("message") for an event that did not explicitly specify a type.
Creates a parser for parsing a of server-sent events into a sequence of values.
The stream containing the data to parse.
The enumerable of strings, which may be enumerated synchronously or asynchronously. The strings
are decoded from the UTF8-encoded bytes of the payload of each event.
is null.
This overload has behavior equivalent to calling with a delegate
that decodes the data of each event using 's GetString method.
Creates a parser for parsing a of server-sent events into a sequence of values.
Specifies the type of data in each event.
The stream containing the data to parse.
The parser to use to transform each payload of bytes into a data element.
The enumerable, which may be enumerated synchronously or asynchronously.
is null.
is null.
Encoding.UTF8.GetString(bytes)
The enumerable may be enumerated only once.
Attribute used to indicate a source generator should create a function for marshalling
arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
This attribute is meaningless if the source generator associated with it is not enabled.
The current built-in source generator only supports C# and only supplies an implementation when
applied to static, partial, non-generic methods.
Initializes a new instance of the .
Name of the library containing the import.
Gets the name of the library containing the import.
Gets or sets the name of the entry point to be called.
Gets or sets how to marshal string arguments to the method.
If this field is set to a value other than ,
must not be specified.
Gets or sets the used to control how string arguments to the method are marshalled.
If this field is specified, must not be specified
or must be set to .
Gets or sets whether the callee sets an error (SetLastError on Windows or errno
on other platforms) before returning from the attributed method.
Specifies how strings should be marshalled for generated p/invokes
Indicates the user is supplying a specific marshaller in .
Use the platform-provided UTF-8 marshaller.
Use the platform-provided UTF-16 marshaller.
Specifies that null is allowed as an input even if the corresponding type disallows it.
Specifies that null is disallowed as an input even if the corresponding type allows it.
Specifies that an output may be null even if the corresponding type disallows it.
Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.
Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter may be null.
Gets the return value condition.
Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter will not be null.
Gets the return value condition.
Specifies that the output will be non-null if the named parameter is non-null.
Initializes the attribute with the associated parameter name.
The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
Gets the associated parameter name.
Applied to a method that will never return under any circumstance.
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
Initializes the attribute with the specified parameter value.
The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
the associated parameter matches this value.
Gets the condition parameter value.
Specifies that the method or property will ensure that the listed field and property members have not-null values.
Initializes the attribute with a field or property member.
The field or property member that is promised to be not-null.
Initializes the attribute with the list of field and property members.
The list of field and property members that are promised to be not-null.
Gets field or property member names.
Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
Initializes the attribute with the specified return value condition and a field or property member.
The return value condition. If the method returns this value, the associated field or property member will not be null.
The field or property member that is promised to be not-null.
Initializes the attribute with the specified return value condition and list of field and property members.
The return value condition. If the method returns this value, the associated field and property members will not be null.
The list of field and property members that are promised to be not-null.
Gets the return value condition.
Gets field or property member names.