Moof/Resource.hh \
Moof/RigidBody.hh \
Moof/Script.hh \
+ Moof/Service.cc \
Moof/Service.hh \
Moof/Settings.cc \
Moof/Settings.hh \
mBoolW = copy.mBoolW;
mBoolNumR = copy.mBoolNumR;
mBoolNumW = copy.mBoolNumW;
+ if (mBuffer) memcpy(mBuffer, copy.mBuffer, mSize);
return *this;
}
}
if (!mBuffer) return 0;
}
- memcpy(&mBuffer[mW], bytes, nBytes);
+ memcpy(mBuffer + mW, bytes, nBytes);
mW += nBytes;
return nBytes;
}
size_t Packet::read(void* bytes, size_t size)
{
size_t nBytes = std::min(size, mW - mR);
- memcpy(bytes, &mBuffer[mR], nBytes);
+ memcpy(bytes, mBuffer + mR, nBytes);
mR += nBytes;
return nBytes;
}
--- /dev/null
+
+/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
+**] All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
+
+#include "Service.hh"
+
+
+namespace Mf {
+
+
+ServiceBroadcaster::ServiceBroadcaster(const std::string& name)
+{
+}
+
+void ServiceBroadcaster::update(Scalar t, Scalar dt)
+{
+}
+
+
+ServiceLocator::ServiceLocator(const std::string& name)
+{
+}
+
+void ServiceLocator::update(Scalar t, Scalar dt)
+{
+}
+
+
+} // namespace Mf
+
int set(int option, int value = 0)
{
+ if (mFd == -1) mFd = socket(mAddress.family(), mAddress.type(), 0);
if (option == SO_NONBLOCK)
{
#ifdef HAVE_FCNTL
int set(int option, const std::string& value)
{
+ if (mFd == -1) mFd = socket(mAddress.family(), mAddress.type(), 0);
return setsockopt(mFd, SOL_SOCKET, option,
value.data(), value.length());
}
int get(int option, int& value)
{
+ if (mFd == -1) mFd = socket(mAddress.family(), mAddress.type(), 0);
if (option == SO_NONBLOCK)
{
#ifdef HAVE_FCNTL
int get(int option, std::string& value)
{
+ if (mFd == -1) mFd = socket(mAddress.family(), mAddress.type(), 0);
char str[64] = {'\0'};
socklen_t optlen = sizeof(str);
int result = getsockopt(mFd, SOL_SOCKET, option, &str, &optlen);