this method is needed because of protobuf's streams works with posix file descriptors