B now sends data to application layer, changed strncpy to memcpy to avoid data corruption