How do servers make requests to clients? #110
-
Pre-submission Checklist
Question Category
Your QuestionI'm working on a Go client / server implementation but running into a big of ambiguity try to implement certain features of the base protocol. This graph seems to indicate that normal operation includes clients making requests to servers, servers responding, and clients possibly sending notifications. When trying to to implement logging, sampling, etc. the specification mentions the server making requests to the client. How is this process supposed to work? Do servers write requests back to the client? In this case the messages coming in via stdin could also be responses from the client? ![]() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Yes, this is correct. Messages arriving on stdin will be JSON-RPC requests, notifications, or responses. The server, in turn, sends its messages to the client over stdout. Since both directions can contain requests and responses, the communication is bidirectional. |
Beta Was this translation helpful? Give feedback.
-
@jspahrsummers @kyleconroy I have the same question but wrt SSE transport. Can you please help? Basically, how would the req/response data flow look like for client features (e,g sampling). I could not find a lot of details wrt this in the spec site. If it is present someplace and i have missed, It would be great to get it. I would be happy to look at any docs or code too for this. |
Beta Was this translation helpful? Give feedback.
Yes, this is correct. Messages arriving on stdin will be JSON-RPC requests, notifications, or responses. The server, in turn, sends its messages to the client over stdout. Since both directions can contain requests and responses, the communication is bidirectional.