StreamableHTTPTransportImpl

org.llm4s.mcp.StreamableHTTPTransportImpl
class StreamableHTTPTransportImpl(url: String, val name: String, timeout: FiniteDuration, httpClient: Llm4sHttpClient) extends MCPTransportImpl

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def close(): Unit

Attributes

Definition Classes
def generateId(): String
override def sendNotification(notification: JsonRpcNotification): Result[Unit]

Attributes

Definition Classes

Sends request and reads its reply, all within timeout (#1785).

Sends request and reads its reply, all within timeout (#1785).

The HTTP request timeout covers only the wait for response headers, and a server that answers with an SSE stream sends them at once. The body is therefore read through a BoundedResponseBody whose deadline is the same instant: whether the reply is plain JSON or an SSE stream, the whole exchange ends by then, with a timed-out transport error, and the connection is closed. An SSE reply is read event by event and the first JSON-RPC response in it is returned at once, without waiting for the server to end the stream.

Attributes

Definition Classes

Concrete fields

override val name: String