Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JSON-RPC in C (server only for now)

License

NotificationsYou must be signed in to change notification settings

hmng/jsonrpc-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON-RPC in C (server only for now)

What?

A library for a C program to receive JSON-RPC requests on tcp sockets (no HTTP).

Free software, MIT license.

Why?

I needed a way for an application written in C, running on an embedded Linux system to be configured bya Java/Swing configuration tool running on a connected laptop. Wanted something simple, human readable,and saw no need for HTTP.

How?

It depends on libevhttp://software.schmorp.de/pkg/libev.html (was already used on the embedded app) and includes cJSON (fromhttps://github.com/DaveGamble/cJSON).No further dependencies.

Testing

Runautoreconf -i before./configure andmake

Test the example server by running it and typing:

echo "{\"method\":\"sayHello\"}" | nc localhost 1234

or

echo "{\"method\": \"add\", \"params\": [3,4], \"id\": \"SOME_IDENTIFIER\" }" | nc localhost 1234

or

echo "{\"method\":\"exit\"}" | nc localhost 1234

Who?

@hmngomes

About

JSON-RPC in C (server only for now)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp