Fix buffer offset error, refactor _receive()
Refactor send()
Merge branch 'connection-refactor' into protobuf-21