add: if (4096 - fSendPosition > size){ memcpy(fSendBuffer + fSendPosition, &data, size); fSendPosition += size; return B_OK;
context: 	template <class Type> status_t Attach(Type data)		{			int32 size=sizeof(Type);		#ifdef CAPACITY_CHECKING			if(bufferlength+size>capacity)				return B_NO_MEMORY;		#endif				// create a new storage object and stash the data			PortLinkData *pld=new PortLinkData;			if(pld->Set(&data,size)==B_OK)			{				attachlist->AddItem(pld);				bufferlength+=size;			}			else			{				delete pld;				return B_ERROR;			}			return B_OK;		}