本文整理汇总了C++中SocketOutputStream::write方法的典型用法代码示例。如果您正苦于以下问题:C++ SocketOutputStream::write方法的具体用法?C++ SocketOutputStream::write怎么用?C++ SocketOutputStream::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocketOutputStream
的用法示例。
在下文中一共展示了SocketOutputStream::write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
//////////////////////////////////////////////////////////////////////
// 출력스트림(버퍼)으로 패킷의 바이너리 이미지를 보낸다.
//////////////////////////////////////////////////////////////////////
void GCAddMonsterFromTransformation::write (SocketOutputStream & oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
BYTE name_length = m_MonsterName.size();
oStream.write(m_ObjectID);
oStream.write(m_MonsterType);
oStream.write(name_length);
if (m_MonsterName.size() != 0) oStream.write(m_MonsterName);
oStream.write(m_MainColor);
oStream.write(m_SubColor);
oStream.write(m_X);
oStream.write(m_Y);
oStream.write(m_Dir);
m_pEffectInfo->write(oStream);
oStream.write(m_CurrentHP);
oStream.write(m_MaxHP);
__END_CATCH
}
示例2: write
void CGDissectionCorpse::write (SocketOutputStream & oStream) const
throw(ProtocolException , Error)
{
__BEGIN_TRY
#ifdef __USE_ENCRYPTER__
SocketEncryptOutputStream* pEOStream = dynamic_cast<SocketEncryptOutputStream*>(&oStream);
Assert(pEOStream!=NULL);
if (pEOStream->getEncryptCode()!=0)
{
SHUFFLE_STATEMENT_4(pEOStream->getEncryptCode(),
pEOStream->writeEncrypt(m_ObjectID),
pEOStream->writeEncrypt(m_X),
pEOStream->writeEncrypt(m_Y),
pEOStream->writeEncrypt(m_IsPet));
}
else
#endif
{
oStream.write(m_ObjectID);
oStream.write(m_X);
oStream.write(m_Y);
oStream.write(m_IsPet);
}
__END_CATCH
}
示例3: write
void NicknameInfo::write(SocketOutputStream& oStream) const
throw(ProtocolException, Error)
{
__BEGIN_TRY
oStream.write(m_NicknameID);
oStream.write(m_NicknameType);
switch (m_NicknameType )
{
case NICK_NONE:
{
break;
}
case NICK_BUILT_IN:
case NICK_QUEST:
case NICK_FORCED:
{
oStream.write(m_NicknameIndex);
break;
}
case NICK_CUSTOM_FORCED:
case NICK_CUSTOM:
{
BYTE szSTR = m_Nickname.size();
oStream.write(szSTR);
oStream.write(m_Nickname);
break;
}
default:
Assert(false);
}
__END_CATCH
}
示例4: write
//////////////////////////////////////////////////////////////////////
// Datagram 객체로 패킷의 바이너리 이미지를 보낸다.
//////////////////////////////////////////////////////////////////////
void SGModifyGuildMemberOK::write (SocketOutputStream& oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
BYTE szName = m_Name.size();
BYTE szSender = m_Sender.size();
if (szName == 0 )
throw InvalidProtocolException("szName == 0");
if (szName > 20 )
throw InvalidProtocolException("too long name length");
if (szSender == 0 )
throw InvalidProtocolException("szSender == 0");
if (szSender > 20 )
throw InvalidProtocolException("too long sender length");
oStream.write(m_GuildID);
oStream.write(szName);
oStream.write(m_Name);
oStream.write(m_GuildMemberRank);
oStream.write(szSender);
oStream.write(m_Sender);
__END_CATCH
}
示例5: write
//--------------------------------------------------------------------------------
// write to socket output stream
//--------------------------------------------------------------------------------
void Resource::write (SocketOutputStream & oStream ) const
throw(IOException , Error )
{
__BEGIN_TRY
//--------------------------------------------------------------------------------
// write version
//--------------------------------------------------------------------------------
oStream.write(m_Version);
//--------------------------------------------------------------------------------
// write filename
//--------------------------------------------------------------------------------
BYTE szFilename = m_Filename.size();
if (szFilename == 0 )
throw InvalidProtocolException("szFilename == 0");
if (szFilename > maxFilename )
throw InvalidProtocolException("too large filename length");
oStream.write(szFilename);
oStream.write(m_Filename);
//--------------------------------------------------------------------------------
// write filesize
//--------------------------------------------------------------------------------
oStream.write(m_FileSize);
__END_CATCH
}
示例6: write
void StoreInfo::write(SocketOutputStream& oStream, bool toOther) const throw(ProtocolException, Error)
{
__BEGIN_TRY
oStream.write(m_Open);
// cout << "m_Open = " << (int)m_Open << endl;
if (toOther && m_Open == 0 ) return;
BYTE szSign = m_Sign.size();
oStream.write(szSign);
if (szSign != 0 ) oStream.write(m_Sign);
BYTE ItemNum = m_Items.size();
oStream.write(ItemNum);
vector<StoreItemInfo>::const_iterator itr = m_Items.begin();
for (; itr != m_Items.end(); ++itr )
{
itr->write(oStream);
}
__END_CATCH
}
示例7: write
void CGSkillToInventory::write (SocketOutputStream & oStream) const
throw(ProtocolException , Error)
{
__BEGIN_TRY
#ifdef __USE_ENCRYPTER__
SocketEncryptOutputStream* pEOStream = dynamic_cast<SocketEncryptOutputStream*>(&oStream);
Assert(pEOStream!=NULL);
if (pEOStream->getEncryptCode()!=0)
{
SHUFFLE_STATEMENT_5(pEOStream->getEncryptCode(),
pEOStream->writeEncrypt(m_SkillType),
pEOStream->writeEncrypt(m_ObjectID),
pEOStream->writeEncrypt(m_X),
pEOStream->writeEncrypt(m_Y),
pEOStream->writeEncrypt(m_TargetX));
pEOStream->writeEncrypt(m_TargetY);
pEOStream->writeEncrypt(m_InventoryItemObjectID);
}
else
#endif
{
oStream.write(m_SkillType);
oStream.write(m_ObjectID);
oStream.write(m_X);
oStream.write(m_Y);
oStream.write(m_TargetX);
oStream.write(m_TargetY);
oStream.write(m_InventoryItemObjectID);
}
__END_CATCH
}
示例8: write
//////////////////////////////////////////////////////////////////////
// 출력스트림(버퍼)으로 패킷의 바이너리 이미지를 보낸다.
//////////////////////////////////////////////////////////////////////
void GCLearnSkillOK::write (SocketOutputStream & oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
oStream.write(m_SkillType);
oStream.write(m_DomainType);
__END_CATCH
}
示例9: write
//////////////////////////////////////////////////////////////////////
// Datagram 객체로 패킷의 바이너리 이미지를 보낸다.
//////////////////////////////////////////////////////////////////////
void SGModifyGuildOK::write (SocketOutputStream& oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
oStream.write(m_GuildID);
oStream.write(m_GuildState);
__END_CATCH
}
示例10: write
//////////////////////////////////////////////////////////////////////
// 출력스트림(버퍼)으로 패킷의 바이너리 이미지를 보낸다.
//////////////////////////////////////////////////////////////////////
void GCDownSkillFailed::write (SocketOutputStream & oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
oStream.write(m_SkillType);
oStream.write(m_Desc);
__END_CATCH
}
示例11: write
//////////////////////////////////////////////////////////////////////////////
// 출력스트림(버퍼)으로 패킷의 바이너리 이미지를 보낸다.
//////////////////////////////////////////////////////////////////////////////
void GCRemoveStoreItem::write (SocketOutputStream & oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
oStream.write(m_OwnerObjectID);
oStream.write(m_Index);
__END_CATCH
}
示例12: write
void CGMakeItem::write (SocketOutputStream & oStream) const
throw(ProtocolException , Error)
{
__BEGIN_TRY
oStream.write(m_ItemClass);
oStream.write(m_ItemType);
__END_CATCH
}
示例13: write
void CGRequestInfo::write (SocketOutputStream & oStream) const
throw(ProtocolException , Error)
{
__BEGIN_TRY
oStream.write(m_Code);
oStream.write(m_Value);
__END_CATCH
}
示例14: write
void CGReloadFromQuickSlot::write (SocketOutputStream & oStream) const
throw(ProtocolException , Error)
{
__BEGIN_TRY
oStream.write(m_ObjectID);
oStream.write(m_SlotID);
__END_CATCH
}
示例15: write
//--------------------------------------------------------------------------------
// 출력스트림(버퍼)으로 패킷의 바이너리 이미지를 보낸다.
//--------------------------------------------------------------------------------
void GCChangeWeather::write (SocketOutputStream & oStream ) const
throw(ProtocolException , Error )
{
__BEGIN_TRY
oStream.write((BYTE)m_Weather);
oStream.write(m_WeatherLevel);
__END_CATCH
}