当前位置: 首页>>代码示例>>C++>>正文


C++ AssignLength函数代码示例

本文整理汇总了C++中AssignLength函数的典型用法代码示例。如果您正苦于以下问题:C++ AssignLength函数的具体用法?C++ AssignLength怎么用?C++ AssignLength使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AssignLength函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SEND_GPSC_RECONNECT

BYTEARRAY CGPSProtocol :: SEND_GPSC_RECONNECT( unsigned char PID, uint32_t reconnectKey, uint32_t lastPacket )
{
	BYTEARRAY packet;
	packet.push_back( GPS_HEADER_CONSTANT );
	packet.push_back( GPS_RECONNECT );
	packet.push_back( 0 );
	packet.push_back( 0 );
	packet.push_back( PID );
	UTIL_AppendByteArray( packet, reconnectKey, false );
	UTIL_AppendByteArray( packet, lastPacket, false );
	AssignLength( packet );
	return packet;
}
开发者ID:Mofsy,项目名称:ghost-one,代码行数:13,代码来源:gpsprotocol.cpp

示例2: SEND_SID_WARDEN

BYTEARRAY CBNETProtocol :: SEND_SID_WARDEN( BYTEARRAY wardenResponse )
{
	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );			// BNET header constant
	packet.push_back( SID_WARDEN );						// SID_WARDEN
	packet.push_back( 0 );								// packet length will be assigned later
	packet.push_back( 0 );								// packet length will be assigned later
	UTIL_AppendByteArrayFast( packet, wardenResponse );	// warden response
	AssignLength( packet );
	// DEBUG_Print( "SENT SID_WARDEN" );
	// DEBUG_Print( packet );
	return packet;
}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:13,代码来源:bnetprotocol.cpp

示例3: SEND_SID_NETGAMEPORT

BYTEARRAY CBNETProtocol :: SEND_SID_NETGAMEPORT( uint16_t serverPort )
{
	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );			// BNET header constant
	packet.push_back( SID_NETGAMEPORT );				// SID_NETGAMEPORT
	packet.push_back( 0 );								// packet length will be assigned later
	packet.push_back( 0 );								// packet length will be assigned later
	UTIL_AppendByteArray( packet, serverPort, false );	// local game server port
	AssignLength( packet );
	// DEBUG_Print( "SENT SID_NETGAMEPORT" );
	// DEBUG_Print( packet );
	return packet;
}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:13,代码来源:bnetprotocol.cpp

示例4: SEND_SID_CHATCOMMAND

BYTEARRAY CBNETProtocol :: SEND_SID_CHATCOMMAND( string command )
{
	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );		// BNET header constant
	packet.push_back( SID_CHATCOMMAND );			// SID_CHATCOMMAND
	packet.push_back( 0 );							// packet length will be assigned later
	packet.push_back( 0 );							// packet length will be assigned later
	UTIL_AppendByteArrayFast( packet, command );	// Message
	AssignLength( packet );
	// DEBUG_Print( "SENT SID_CHATCOMMAND" );
	// DEBUG_Print( packet );
	return packet;
}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:13,代码来源:bnetprotocol.cpp

示例5: SEND_BNLS_WARDEN_RAW

BYTEARRAY CBNLSProtocol :: SEND_BNLS_WARDEN_RAW( uint32_t cookie, BYTEARRAY raw )
{
    BYTEARRAY packet;
    packet.push_back( 0 );											// packet length will be assigned later
    packet.push_back( 0 );											// packet length will be assigned later
    packet.push_back( BNLS_WARDEN );								// BNLS_WARDEN
    packet.push_back( 1 );											// BNLS_WARDEN_RAW
    UTIL_AppendByteArray( packet, cookie, false );					// cookie
    UTIL_AppendByteArray( packet, (uint16_t)raw.size( ), false );	// raw length
    UTIL_AppendByteArray( packet, raw );							// raw
    AssignLength( packet );
    return packet;
}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:13,代码来源:bnlsprotocol.cpp

示例6: SEND_GPSS_INIT

BYTEARRAY CGPSProtocol :: SEND_GPSS_INIT( uint16_t reconnectPort, unsigned char PID, uint32_t reconnectKey, unsigned char numEmptyActions )
{
	BYTEARRAY packet;
	packet.push_back( GPS_HEADER_CONSTANT );
	packet.push_back( GPS_INIT );
	packet.push_back( 0 );
	packet.push_back( 0 );
	UTIL_AppendByteArray( packet, reconnectPort, false );
	packet.push_back( PID );
	UTIL_AppendByteArray( packet, reconnectKey, false );
	packet.push_back( numEmptyActions );
	AssignLength( packet );
	return packet;
}
开发者ID:PrOGm2,项目名称:ent-ghost,代码行数:14,代码来源:gpsprotocol.cpp

示例7: SEND_SID_CLANSETMOTD

BYTEARRAY CBNETProtocol :: SEND_SID_CLANSETMOTD( string motd )
{
	unsigned char Cookie[] = { 0, 0, 0, 0 };

	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );	// BNET header constant
	packet.push_back( SID_CLANSETMOTD );		// SID_CLANSETMOTD
	packet.push_back( 0 );						// packet length will be assigned later
	packet.push_back( 0 );						// packet length will be assigned later
	UTIL_AppendByteArray( packet, Cookie, 4);
	UTIL_AppendByteArray( packet, motd);
	AssignLength( packet );
	return packet;
}
开发者ID:4RtY,项目名称:ghostpp,代码行数:14,代码来源:bnetprotocol.cpp

示例8: SendUnableToCreate

BYTEARRAY CPUBProtocol :: SendUnableToCreate( )
{
    BYTEARRAY packet;

    packet.push_back( PUB_HEADER_CONSTANT );		// Auth header  1 byte
    packet.push_back( PUB_UNABLETOCREATE );           // 1 byte

    packet.push_back( 0 );           // 1 byte
    packet.push_back( 0 );           // 1 byte

    AssignLength(packet);

    return packet;
}
开发者ID:brunobnb,项目名称:brtGHost,代码行数:14,代码来源:pubprotocol.cpp

示例9: SEND_SID_CLANINVITATION

BYTEARRAY CBNETProtocol :: SEND_SID_CLANINVITATION( string accountName )
{
	unsigned char Cookie[] = { 0, 0, 0, 0 };

	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );	// BNET header constant
	packet.push_back( SID_CLANINVITATION );		// SID_CLANINVITATION
	packet.push_back( 0 );						// packet length will be assigned later
	packet.push_back( 0 );						// packet length will be assigned later
	UTIL_AppendByteArray( packet, Cookie, 4);
	UTIL_AppendByteArray( packet, accountName);
	AssignLength( packet );
	return packet;	
}
开发者ID:4RtY,项目名称:ghostpp,代码行数:14,代码来源:bnetprotocol.cpp

示例10: SEND_GAME_KEY

BYTEARRAY CPUBProtocol :: SEND_GAME_KEY( string key, string login )
{
	BYTEARRAY packet;
	packet.push_back( PUB_HEADER_CONSTANT );
	packet.push_back( this->PUB_BOT_GAME_KEY );
	packet.push_back( 0 );
	packet.push_back( 0 );
	packet.push_back( key.size() );
	UTIL_AppendByteArray( packet, key, false );
	packet.push_back( login.size() );
	UTIL_AppendByteArray( packet, login, false );
	AssignLength( packet );
	return packet;
}
开发者ID:brunobnb,项目名称:brtGHost,代码行数:14,代码来源:pubprotocol.cpp

示例11: SendVersionOk

BYTEARRAY CPUBProtocol :: SendVersionOk()
{
    BYTEARRAY packet;

    packet.push_back( PUB_HEADER_CONSTANT );
    packet.push_back( PUB_VERSION_OK );

    packet.push_back( 0 ); // assign later
    packet.push_back( 0 ); // assign later

    AssignLength(packet);

    return packet;
}
开发者ID:brunobnb,项目名称:brtGHost,代码行数:14,代码来源:pubprotocol.cpp

示例12: SendAuthFailed

BYTEARRAY CPUBProtocol :: SendAuthFailed( )
{
    BYTEARRAY packet;

    packet.push_back( PUB_HEADER_CONSTANT );		// Auth header  1 byte
    packet.push_back( PUB_AUTH_FAILED );           // 1 byte

    packet.push_back(0);
    packet.push_back(0);

    AssignLength(packet);

    return packet;
}
开发者ID:brunobnb,项目名称:brtGHost,代码行数:14,代码来源:pubprotocol.cpp

示例13: SEND_SID_ENTERCHAT

BYTEARRAY CBNETProtocol :: SEND_SID_ENTERCHAT( )
{
	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );	// BNET header constant
	packet.push_back( SID_ENTERCHAT );			// SID_ENTERCHAT
	packet.push_back( 0 );						// packet length will be assigned later
	packet.push_back( 0 );						// packet length will be assigned later
	packet.push_back( 0 );						// Account Name is NULL on Warcraft III/The Frozen Throne
	packet.push_back( 0 );						// Stat String is NULL on CDKEY'd products
	AssignLength( packet );
	// DEBUG_Print( "SENT SID_ENTERCHAT" );
	// DEBUG_Print( packet );
	return packet;
}
开发者ID:RiseCakoPlusplus,项目名称:brtGHost,代码行数:14,代码来源:bnetprotocol.cpp

示例14: SEND_SID_CLANMEMBERLIST

BYTEARRAY CBNETProtocol :: SEND_SID_CLANMEMBERLIST( )
{
	unsigned char Cookie[] = { 0, 0, 0, 0 };

	BYTEARRAY packet;
	packet.push_back( BNET_HEADER_CONSTANT );	// BNET header constant
	packet.push_back( SID_CLANMEMBERLIST );		// SID_CLANMEMBERLIST
	packet.push_back( 0 );						// packet length will be assigned later
	packet.push_back( 0 );						// packet length will be assigned later
	UTIL_AppendByteArray( packet, Cookie, 4 );	// cookie
	AssignLength( packet );
	// DEBUG_Print( "SENT SID_CLANMEMBERLIST" );
	// DEBUG_Print( packet );
	return packet;
}
开发者ID:RiseCakoPlusplus,项目名称:brtGHost,代码行数:15,代码来源:bnetprotocol.cpp

示例15: SEND_W3GS_SLOTINFO

BYTEARRAY CGameProtocol :: SEND_W3GS_SLOTINFO( vector<CGameSlot> &slots, uint32_t randomSeed, unsigned char layoutStyle, unsigned char playerSlots )
{
	BYTEARRAY SlotInfo = EncodeSlotInfo( slots, randomSeed, layoutStyle, playerSlots );
	BYTEARRAY packet;
	packet.push_back( W3GS_HEADER_CONSTANT );									// W3GS header constant
	packet.push_back( W3GS_SLOTINFO );											// W3GS_SLOTINFO
	packet.push_back( 0 );														// packet length will be assigned later
	packet.push_back( 0 );														// packet length will be assigned later
	UTIL_AppendByteArray( packet, (uint16_t)SlotInfo.size( ), false );			// SlotInfo length
	UTIL_AppendByteArrayFast( packet, SlotInfo );								// SlotInfo
	AssignLength( packet );
	// DEBUG_Print( "SENT W3GS_SLOTINFO" );
	// DEBUG_Print( packet );
	return packet;
}
开发者ID:brunobnb,项目名称:ghostcb,代码行数:15,代码来源:gameprotocol.cpp


注:本文中的AssignLength函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。