예제 #1
0
 // -----------------------------------------------------------------------
 NetStreamStorage NetStreamStorage::operator+(const NetStreamStorage &storage)
 {
   NetStreamStorage msg;
   msg.store.insert(msg.store.end(), store.begin(), store.end());
   msg.store.insert(msg.store.end(), storage.begin(), storage.end());
   return msg;
 }
	void
		NetStreamSocket::
		sendExact( const NetStreamStorage &b)
		throw( NetStreamSocketException )
	{
		int length = static_cast<int>(b.size());
		NetStreamStorage length_storage;
		length_storage.writeInt(length);
		vector<unsigned char> msg;
		msg.insert(msg.end(), length_storage.begin(), length_storage.end());
		msg.insert(msg.end(), b.begin(), b.end());
		send(msg);
	}