Merge branch 'optional-tcp-started-callback' into 'master'
Stop forcing a tcp-started-callback See merge request nico/json-process-client!7
|4 months ago|
|test||5 months ago|
|.gitignore||5 months ago|
|.gitlab-ci.yml||5 months ago|
|COPYING||5 months ago|
|Makefile||5 months ago|
|README.org||5 months ago|
|json-process-client.el||4 months ago|
The package json-process-client is an Emacs library to facilitate communicating with servers that read and write JSON. The library is responsible for starting the server and connecting with TCP. It is also responsible for converting to and from JSON.
There are two entry points to the API:
~json-process-client-start-with-id~. They both launch an executable
passed as parameter wait for it to be ready, and connect to it using
TCP. They both return an "application" that must be passed as
parameter to all other functions of the API.
Because everything is asynchronous, the server can send responses in a
different order than the messages the client sent. The server can also
send messages which are not responses to a former message. There must
be a way to map responses to the initial message when there was
one. The two functions
~json-process-client-start-with-id~ differs in the way they map
responses to their corresponding message. The later function is the
simplest but requires that the server reads ids from the messages and
writes the ids back in its responses. The former function let the API
user implement the mapping.
There are three other public methods in the API:
json-process-client-stopterminates the TCP connection and the
json-process-client-process-live-preturns non-nil if the server
json-process-client-sendsends a message to the server and