void localServerReplyFunc(struct ReplyAddress *inReplyAddr, char* inBuf, int inSize) { bool isBundle = IsBundle(inBuf); pthread_mutex_lock (&gLangMutex); if (compiledOK) { PyrObject *replyObj = ConvertReplyAddress(inReplyAddr); if (isBundle) { PerformOSCBundle(inSize, inBuf, replyObj); } else { PerformOSCMessage(inSize, inBuf, replyObj); } } pthread_mutex_unlock (&gLangMutex); }
void localServerReplyFunc(struct ReplyAddress *inReplyAddr, char* inBuf, int inSize) { bool isBundle = IsBundle(inBuf); gLangMutex.lock(); if (compiledOK) { PyrObject *replyObj = ConvertReplyAddress(inReplyAddr); if (isBundle) { PerformOSCBundle(inSize, inBuf, replyObj, gUDPport->RealPortNum()); } else { PerformOSCMessage(inSize, inBuf, replyObj, gUDPport->RealPortNum()); } } gLangMutex.unlock(); }
void ProcessOSCPacket(OSC_Packet* inPacket) { //post("recv '%s' %d\n", inPacket->mData, inPacket->mSize); inPacket->mIsBundle = IsBundle(inPacket->mData); pthread_mutex_lock (&gLangMutex); if (compiledOK) { PyrObject *replyObj = ConvertReplyAddress(&inPacket->mReplyAddr); if (compiledOK) { if (inPacket->mIsBundle) { PerformOSCBundle(inPacket->mSize, inPacket->mData, replyObj); } else { PerformOSCMessage(inPacket->mSize, inPacket->mData, replyObj); } } } pthread_mutex_unlock (&gLangMutex); FreeOSCPacket(inPacket); }
// takes ownership of inPacket void ProcessOSCPacket(OSC_Packet* inPacket, int inPortNum) { //post("recv '%s' %d\n", inPacket->mData, inPacket->mSize); inPacket->mIsBundle = IsBundle(inPacket->mData); gLangMutex.lock(); if (compiledOK) { PyrObject *replyObj = ConvertReplyAddress(&inPacket->mReplyAddr); if (compiledOK) { if (inPacket->mIsBundle) { PerformOSCBundle(inPacket->mSize, inPacket->mData, replyObj, inPortNum); } else { PerformOSCMessage(inPacket->mSize, inPacket->mData, replyObj, inPortNum); } } } gLangMutex.unlock(); FreeOSCPacket(inPacket); }