common: slightly reworked default messaging abstraction
authorKrisztian Litkey <krisztian.litkey@intel.com>
Fri, 11 May 2012 11:33:02 +0000 (14:33 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Tue, 15 May 2012 12:07:28 +0000 (15:07 +0300)
commit259a8db10ca449f92433618d81f9d81b0da0b644
treec6dcb0e20a0f81c326d42e92ac9df3197793bc91
parentd8e83132d9b14638c7aaeb76e252a733ed4229bd
common: slightly reworked default messaging abstraction

Hmm... I'm not happy with this at all. It's better than the original
quick-hack proto but not by a large enough margin. It probably needs
quite a bit of work still eventually. One thing that needs to be added
is a way to let users use the transport layer without forcing the default
messaging abstraction/encoding/decoding on them. This should preferably
happen by allowing users to send (almost) arbitrary data structures over
a transport by providing a descriptor that describes the layout of the
data structure in terms of offset/MRP_MSG_FIELD_* allowing the transport
or messaging layer to do the encoding/decoding of the data. The sending
part is relatively easy. The trickier part is the receiving side and to
come up with an API that is simple and intuitive enough to be usable yet
allows one to flexibly multiplex any number of structure types over the
same transport connection...
12 files changed:
src/common/dgram-transport.c
src/common/msg.c
src/common/msg.h
src/common/tests/dgram-test.c
src/common/tests/msg-test.c
src/common/tests/stream-test.c
src/common/tests/tcp-test.c
src/common/tests/udp-test.c
src/common/transport.c
src/console-client/client.c
src/plugins/console-protocol.h [new file with mode: 0644]
src/plugins/plugin-console.c