mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
putil: Accept bytes in DatagramOutputFile::write_header()
This commit is contained in:
parent
87b46a61ed
commit
eb82dbc765
@ -86,6 +86,22 @@ close() {
|
|||||||
_error = false;
|
_error = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a sequence of bytes to the beginning of the datagram file. This may
|
||||||
|
* be called any number of times after the file has been opened and before the
|
||||||
|
* first datagram is written. It may not be called once the first datagram is
|
||||||
|
* written.
|
||||||
|
*/
|
||||||
|
bool DatagramOutputFile::
|
||||||
|
write_header(const vector_uchar &header) {
|
||||||
|
nassertr(_out != nullptr, false);
|
||||||
|
nassertr(!_wrote_first_datagram, false);
|
||||||
|
|
||||||
|
_out->write((const char *)&header[0], header.size());
|
||||||
|
thread_consider_yield();
|
||||||
|
return !_out->fail();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a sequence of bytes to the beginning of the datagram file. This may
|
* Writes a sequence of bytes to the beginning of the datagram file. This may
|
||||||
* be called any number of times after the file has been opened and before the
|
* be called any number of times after the file has been opened and before the
|
||||||
|
@ -38,6 +38,7 @@ PUBLISHED:
|
|||||||
|
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
|
bool write_header(const vector_uchar &header);
|
||||||
bool write_header(const std::string &header);
|
bool write_header(const std::string &header);
|
||||||
virtual bool put_datagram(const Datagram &data);
|
virtual bool put_datagram(const Datagram &data);
|
||||||
virtual bool copy_datagram(SubfileInfo &result, const Filename &filename);
|
virtual bool copy_datagram(SubfileInfo &result, const Filename &filename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user