]> git.zarvox.org Git - imoo.git/commit
Length-coded framing for socket reads
authorDrew Fisher <drew.m.fisher@gmail.com>
Thu, 17 Apr 2014 04:35:32 +0000 (21:35 -0700)
committerDrew Fisher <drew.m.fisher@gmail.com>
Thu, 17 Apr 2014 04:42:30 +0000 (21:42 -0700)
commitddfb23ddb57d31558937d531677ad86ecca58d11
tree49f32a6c015d65970498f3f40b8f13c6cf8957e2
parent82b0433192ab41933af9a16b2831508fd170162c
Length-coded framing for socket reads

Messages go on the wire as:

struct message {
    uint32_t length;
    uint8_t data[length];
}

and are correctly decoded.
ribbon/ribbonserver.cpp
ribbon/ribbonserver.h
ribbon/ribbonsocket.cpp
ribbon/ribbonsocket.h