mcp: add Session.ID (#67)
Support retrieving the session ID from client and server sessions. Fixes #65.
This commit is contained in:
parent
e1b1cd0072
commit
9b6327b3b7
1 changed files with 67 additions and 11 deletions
|
|
@ -36,6 +36,9 @@ type methodHandler any // MethodHandler[*ClientSession] | MethodHandler[*ServerS
|
|||
// A Session is either a ClientSession or a ServerSession.
|
||||
type Session interface {
|
||||
*ClientSession | *ServerSession
|
||||
// ID returns the session ID, or the empty string if there is none.
|
||||
ID() string
|
||||
|
||||
sendingMethodInfos() map[string]methodInfo
|
||||
receivingMethodInfos() map[string]methodInfo
|
||||
sendingMethodHandler() methodHandler
|
||||
|
|
|
|||
Loading…
Reference in a new issue