I have set of api's to be called over a transport (say for eg RS232 and some other transports). Essentially the calling side runs on a host and sends something like this:
(func_name, param_1, param_2, param_3)
over the RS232 link and a bit of code at the other end does the actual function calling.
To transfer the function name and params serialized over the transport, what are the points I should keep in mind ? Assuming security is not an issue and I am not expecting any attacks over the RS232 or any other transport interface, can I simply create a string of the form:
"(func_name, param_1, param_2, param_3)" and send it over the RS232 开发者_JS百科?
I would use an existing format such as JSON and use it to serialize the data.
精彩评论