summaryrefslogtreecommitdiff
path: root/indra/llmessage/llpacketbuffer.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
committerJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
commit420b91db29485df39fd6e724e782c449158811cb (patch)
treeb471a94563af914d3ed3edd3e856d21cb1b69945 /indra/llmessage/llpacketbuffer.cpp
Print done when done.
Diffstat (limited to 'indra/llmessage/llpacketbuffer.cpp')
-rw-r--r--indra/llmessage/llpacketbuffer.cpp75
1 files changed, 75 insertions, 0 deletions
diff --git a/indra/llmessage/llpacketbuffer.cpp b/indra/llmessage/llpacketbuffer.cpp
new file mode 100644
index 0000000000..95c2217a69
--- /dev/null
+++ b/indra/llmessage/llpacketbuffer.cpp
@@ -0,0 +1,75 @@
+/**
+ * @file llpacketbuffer.cpp
+ * @brief implementation of LLPacketBuffer class for a packet.
+ *
+ * Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#include "linden_common.h"
+
+#include "llpacketbuffer.h"
+
+#include "net.h"
+#include "timing.h"
+#include "llhost.h"
+
+///////////////////////////////////////////////////////////
+
+LLPacketBuffer::LLPacketBuffer(const LLHost &host, const char *datap, const S32 size) : mHost(host)
+{
+ if (size > NET_BUFFER_SIZE)
+ {
+ llerrs << "Sending packet > " << NET_BUFFER_SIZE << " of size " << size << llendl;
+ }
+
+ if (datap != NULL)
+ {
+ memcpy(mData, datap, size);
+ mSize = size;
+ }
+
+}
+
+LLPacketBuffer::LLPacketBuffer (S32 hSocket)
+{
+ init(hSocket);
+}
+
+///////////////////////////////////////////////////////////
+
+LLPacketBuffer::~LLPacketBuffer ()
+{
+ free();
+}
+
+///////////////////////////////////////////////////////////
+
+void LLPacketBuffer::init (S32 hSocket)
+{
+ mSize = receive_packet(hSocket, mData);
+ mHost = ::get_sender();
+}
+
+///////////////////////////////////////////////////////////
+
+void LLPacketBuffer::free ()
+{
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+