Messages are chunked up so it is inappropriate to try to parse on 'data'. Instead we add to a buffer and parse on 'end' which appears to work.