[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9789: add method for writing Buffers
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9789: add method for writing Buffers, but specifying a file descriptor. |
Date: |
Wed, 26 Nov 2008 15:57:44 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9789
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2008-11-26 15:57:44 -0700
message:
add method for writing Buffers, but specifying a file descriptor.
modified:
libnet/network.cpp
libnet/network.h
=== modified file 'libnet/network.cpp'
--- a/libnet/network.cpp 2008-11-24 02:32:07 +0000
+++ b/libnet/network.cpp 2008-11-26 22:57:44 +0000
@@ -914,12 +914,37 @@
int
Network::writeNet(amf::Buffer *buffer)
{
- return writeNet(buffer->reference(), buffer->size());
+ GNASH_REPORT_FUNCTION;
+ return writeNet(buffer->reference(), buffer->allocated());
+};
+
+int
+Network::writeNet(int fd, amf::Buffer *buffer)
+{
+ GNASH_REPORT_FUNCTION;
+ return writeNet(fd, buffer->reference(), buffer->allocated());
+};
+
+// Write to the connection
+int
+Network::writeNet(amf::Buffer &buffer)
+{
+ GNASH_REPORT_FUNCTION;
+ return writeNet(buffer.reference(), buffer.allocated());
+};
+
+// Write to the connection
+int
+Network::writeNet(int fd, amf::Buffer &buffer)
+{
+ GNASH_REPORT_FUNCTION;
+ return writeNet(fd, buffer.reference(), buffer.allocated());
};
int
Network::writeNet(const std::string& data)
{
+// GNASH_REPORT_FUNCTION;
return writeNet(reinterpret_cast<const byte_t *>(data.c_str()),
data.size());
}
=== modified file 'libnet/network.h'
--- a/libnet/network.h 2008-11-21 20:43:53 +0000
+++ b/libnet/network.h 2008-11-26 22:57:44 +0000
@@ -170,6 +170,9 @@
///
/// @return The number of bytes read.
int writeNet(amf::Buffer *buffer);
+ int writeNet(amf::Buffer &buffer);
+ int writeNet(int fd, amf::Buffer *buffer);
+ int writeNet(int fd, amf::Buffer &buffer);
int writeNet(const std::string &data);
int writeNet(const byte_t *data, int nbytes);
// int writeNet(int fd, const byte_t *buffer);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9789: add method for writing Buffers, but specifying a file descriptor.,
rob <=