Used memcpy for assembling packets