您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GSI_UNUSED函数代码示例

51自学网 2021-06-01 20:55:38
  C++
这篇教程C++ GSI_UNUSED函数代码示例写得很实用,希望能帮到您。

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

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

示例1: gpiSendOrBufferChar

GPResultgpiSendOrBufferChar(  GPConnection * connection,  GPIPeer_st peer,  char c){	//GPIBool closed;	//int sent;/*	assert(peer->outputBuffer.buffer != NULL);	// Only try to send if the buffer is empty and there are no messages.	/////////////////////////////////////////////////////////////////////	if(!(peer->outputBuffer.len - peer->outputBuffer.pos) && !ArrayLength(peer->messages))	{		CHECK_RESULT(gpiSendData(connection, peer->sock, &c, 1, &closed, &sent, "PT"));		if(sent)			return GP_NO_ERROR;	}	// Buffer if not sent.	//////////////////////	return gpiAppendCharToBuffer(connection, &peer->outputBuffer, c);	*/	GSI_UNUSED(c);	GSI_UNUSED(peer);	GSI_UNUSED(connection);	return GP_NO_ERROR;}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:30,


示例2: UCS2ToAsciiString

GHTTPBool ghttpPostAddFileFromMemoryW(	GHTTPPost post,	const unsigned short * name,	const char * buffer,	int bufferLen,	const unsigned short * reportFilename,	const unsigned short * contentType){	char name_A[1024] = { '/0' };	char reportFilename_A[1024] = { '/0' };	char contentType_A[1024] = { '/0' };	if (name != NULL)		UCS2ToAsciiString(name, name_A);	if (reportFilename != NULL)		UCS2ToAsciiString(reportFilename, reportFilename_A);	if (contentType != NULL)		UCS2ToAsciiString(contentType, contentType_A);		return ghttpPostAddFileFromMemoryA(post, name_A, buffer, bufferLen, reportFilename_A, contentType_A);		GSI_UNUSED(reportFilename);	GSI_UNUSED(contentType);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,


示例3: gpiPeerPingReplyCallback

void gpiPeerPingReplyCallback(unsigned int ip, unsigned short port, unsigned int latency, void *userData){	GSI_UNUSED(userData);	GSI_UNUSED(latency);	GSI_UNUSED(port);	GSI_UNUSED(ip);}
开发者ID:DevSlashNull,项目名称:GameSpy,代码行数:7,


示例4: gpiPeerAcceptedCallback

void gpiPeerAcceptedCallback(unsigned int ip, unsigned short port, 							 GSUdpErrorCode error, gsi_bool rejected, void *userData){	GPConnection *connection = (GPConnection *)userData;	GPIPeer *aPeer;	IN_ADDR anAddr;	anAddr.s_addr = ip;		aPeer = gpiGetPeerByAddr(connection, ip, port);	if (!aPeer)	{		gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Network, GSIDebugLevel_HotError,			"Peer does not exist: ip-port: %s:%d/n", inet_ntoa(anAddr), port);	}	else	{		if (rejected)		{			aPeer->state = GPI_PEER_DISCONNECTED;			gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Network, GSIDebugLevel_Notice,				"Peer Connection rejected: ip-port: %s:%d/n", inet_ntoa(anAddr), port);			return;		}	}		gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Network, GSIDebugLevel_Notice,		"Peer Connection accepted: ip-port: %s:%d/n", inet_ntoa(anAddr), port);		GSI_UNUSED(userData);	GSI_UNUSED(rejected);	GSI_UNUSED(error);	GSI_UNUSED(anAddr);	}
开发者ID:DevSlashNull,项目名称:GameSpy,代码行数:33,


示例5: createSessionCallback

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// This will be triggered when scCreateSession() has completed.//    Expected to occur once per reported game session.void createSessionCallback(SCInterfacePtr theInterface,						   GHTTPResult theHttpResult,                           SCResult theResult,						   void * theUserData){		gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Notice, 		"CreateSessionCallback: theHttpResult = %d, theResult = %s/r/n", theHttpResult, SCResultStr[theResult]);		if (theHttpResult == GHTTPSuccess && theResult == SCResult_NO_ERROR)	{		const char * sessionId    = scGetSessionId(theInterface);		const char * connectionId = scGetConnectionId(theInterface);		gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Debug, "Session ID: %s/r/n", sessionId);		gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Debug, "Connection ID: %s/r/n", connectionId);		GSI_UNUSED(sessionId);		GSI_UNUSED(connectionId);	}	gServerData.mWaitCount--; // one less request to wait for	GSI_UNUSED(theInterface);	GSI_UNUSED(theUserData);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:29,


示例6: _tprintf

static void EnumPlayersCallback(	PEER peer,	PEERBool success,	RoomType roomType,	int index,	const gsi_char * nick,	int flags,	void * param){	if(!success)	{		_tprintf(_T("Enum %s players failed/n"), RtoS[roomType]);		return;	}	if(index == -1)	{		_tprintf(_T("--------------------/n"));		return;	}	_tprintf(_T("%d: %s/n"), index, nick);	/*if(flags & PEER_FLAG_OP)		_tprintf(_T(" (host)/n"));	else		_tprintf(_T("/n"));*/			GSI_UNUSED(peer);	GSI_UNUSED(param);	GSI_UNUSED(flags);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,


示例7: GSI_UNUSED

// Used to list the players in the title room.//////////////////////////////////////////////static void EnumTitlePlayersCallback(	PEER peer,	PEERBool success,	RoomType roomType,	int index,	const char * nick,	int flags,	void * param){	if(!success)	{		Wizard->MessageBox("Error listing title-room players.");		return;	}	if(index == -1)		return;	TitlePage->UpdatePlayerPing(nick, 9999);	GSI_UNUSED(peer);	GSI_UNUSED(flags);	GSI_UNUSED(roomType);	GSI_UNUSED(param);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:28,


示例8: _stprintf

static void QRServerKeyCallback(	PEER peer,	int key,	qr2_buffer_t buffer,	void * param){#if VERBOSE	gsi_char verbose[256];	_stprintf(verbose, _T("QR_SERVER_KEY | %d/n"), key);	OutputDebugString(verbose);#endif	switch(key)	{	case HOSTNAME_KEY:		_tprintf(_T(" Server Key callback is being called for HOSTNAME_KEY/n"));		qr2_buffer_add(buffer, _T("My Game"));		break;	case NUMPLAYERS_KEY:		_tprintf(_T(" Server Key callback is being called for NUMPLAYERS_KEY/n"));		qr2_buffer_add_int(buffer, 1);		break;	case GAMEMODE_KEY:		_tprintf(_T(" Server Key callback is being called for GAMEMODE_KEY/n"));		qr2_buffer_add(buffer, _T("openplaying"));		break;	case HOSTPORT_KEY:		_tprintf(_T(" Server Key callback is being called for HOSTPORT_KEY/n"));		qr2_buffer_add_int(buffer, 15151);		break;	case MAPNAME_KEY:		_tprintf(_T(" Server Key callback is being called for MAPNAME_KEY/n"));		qr2_buffer_add(buffer, _T("Big Crate Room"));		break;	case GAMETYPE_KEY:		_tprintf(_T(" Server Key callback is being called for GAMETYPE_KEY/n"));		qr2_buffer_add(buffer, _T("Friendly"));		break;	case TIMELIMIT_KEY:		_tprintf(_T(" Server Key callback is being called for TIMELIMIT_KEY/n"));		qr2_buffer_add_int(buffer, 100);		break;	case FRAGLIMIT_KEY:		_tprintf(_T(" Server Key callback is being called for FRAGLIMIT_KEY/n"));		qr2_buffer_add_int(buffer, 0);		break;	case TEAMPLAY_KEY:		_tprintf(_T(" Server Key callback is being called for TEAMPLAY_KEY/n"));		qr2_buffer_add_int(buffer, 0);		break;	default:		qr2_buffer_add(buffer, _T(""));		break;	}		GSI_UNUSED(peer);	GSI_UNUSED(param);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:60,


示例9: piFindPlayerByIP

static void piPinged(	unsigned int IP,	unsigned short port,	int ping,	const char * data,	int len,	PEER peer){	piPlayer * player;	// Find the player.	///////////////////	player = piFindPlayerByIP(peer, IP);	if(!player)		return;	// Process the ping.	////////////////////	piProcessPing(peer, player, ping);		GSI_UNUSED(port);	GSI_UNUSED(data);	GSI_UNUSED(len);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,


示例10: TableMap

static void piPingerReply(	unsigned int IP,	unsigned short port,	int ping,	const char * pingData,	int pingDataLen,	PEER peer){	piPingerReplyData data;	PEER_CONNECTION;	// Find who sent the ping.	//////////////////////////	data.peer = peer;	data.IP = IP;	data.ping = ping;	TableMap(connection->players, piPingerReplyMapFn, &data);		GSI_UNUSED(port);	GSI_UNUSED(pingData);	GSI_UNUSED(pingDataLen);	}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,


示例11: _tsnprintf

static void NickErrorCallback(	PEER peer,	int type,	const gsi_char * badNick,	int numSuggestedNicks,	const gsi_char ** suggestedNicks,	void * param){	static int errCount;	if(errCount < 20)	{		_tsnprintf(nick,NICK_SIZE,_T("peerc%u"),(unsigned int)current_time());		nick[NICK_SIZE - 1] = '/0';		peerRetryWithNick(peer, nick);	}	else	{		//peerDisconnect(peer);		peerRetryWithNick(peer, NULL);	}	errCount++;		GSI_UNUSED(type);	GSI_UNUSED(badNick);	GSI_UNUSED(suggestedNicks);	GSI_UNUSED(numSuggestedNicks);	GSI_UNUSED(param);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:31,


示例12: GSI_UNUSED

static const unsigned short * piGetWatchKeyW(	const unsigned short * nick,	const unsigned short * key,	HashTable watchCache){#ifndef GSI_UNICODE	GSI_UNUSED(nick);	GSI_UNUSED(key);	GSI_UNUSED(watchCache);	return NULL; // can't use this function unless in GSI_UNICODE mode#else	piCacheKey keyTemp;	piCacheKey * cacheKey;	char* nick_A = UCS2ToUTF8StringAlloc(nick);	char* key_A = UCS2ToUTF8StringAlloc(key);	keyTemp.nick = (char *)nick_A;	keyTemp.key = (char *)key_A;	cacheKey = (piCacheKey *)TableLookup(watchCache, &keyTemp);	gsifree(nick_A);	gsifree(key_A);	if (!cacheKey)		return NULL;	if(cacheKey->value_W)		return cacheKey->value_W;	return L"";#endif}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,


示例13: GSI_UNUSED

static GHTTPBool CompletedCallback(	GHTTPRequest request,	GHTTPResult result,	char * buffer,	GHTTPByteCount bufferLen,	void * param){	CGhttpmfcDlg * dlg = (CGhttpmfcDlg *)param;	static char * resultStrings[] =	{		"GHTTPSuccess",		"GHTTPOutOfMemory",		"GHTTPBufferOverflow",		"GHTTPParseURLFailed",		"GHTTPHostLookupFailed",		"GHTTPSocketFailed",		"GHTTPConnectFailed",		"GHTTPBadResponse",		"GHTTPRequestRejected",		"GHTTPUnauthorized",		"GHTTPForbidden",		"GHTTPFileNotFound",		"GHTTPServerError",		"GHTTPFileWriteFailed",		"GHTTPFileReadFailed",		"GHTTPFileIncomplete",		"GHTTPFileToBig",		"GHTTPEncryptionError",		"GHTTPRequestCancelled"	};	CString msg;	if( GHTTPSuccess == result )	{		msg = "File received successfully";	}	else	{		msg.Format("Error: (%d) ", result);		if( result < 0 || result >= sizeof(resultStrings)/sizeof(resultStrings[0]) )			msg += "Unknown - local error table may be out of date";		else			msg += resultStrings[(int)result];	}	dlg->MessageBox(msg);	dlg->m_request = -1;	return GHTTPTrue;	GSI_UNUSED(bufferLen);	GSI_UNUSED(buffer);	GSI_UNUSED(request);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:59,


示例14: gsUdpConnAttemptCB

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Requests for communication from a peer is handled by first checking if the // initial message has a message handler registered for it.  Otherwise // the message is passed onto the app.void gsUdpConnAttemptCB(GT2Socket socket, GT2Connection connection, unsigned int ip, 						unsigned short port, int latency, GT2Byte * message, int len){	// Get the message handler for the connection 	int index;	GSUdpMsgHandler aHandler;	GSUdpRemotePeer aRemotePeer;	GSUdpEngineObject *aUdp = gsUdpEngineGetEngine();	char anAddr[GS_IP_ADDR_AND_PORT];		gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Network, GSIDebugLevel_Comment, 		"[Udp Engine] Connection attempt from %s/n", gt2AddressToString(ip, port, anAddr));	//If there is a handler, automatically accept a connection if the initial message is	//the same as the handler's registered initial message	if (len >= GS_UDP_MSG_HEADER_LEN)	{    		memcpy(aHandler.mInitialMsg, message, GS_UDP_MSG_HEADER_LEN);				aRemotePeer.mAddr = ip;		aRemotePeer.mPort = port;		aRemotePeer.mConnection = connection;				ArrayAppend(aUdp->mRemotePeers, &aRemotePeer);		index = ArraySearch(aUdp->mMsgHandlers, &aHandler, gsUdpMsgHandlerCompare, 0, 0);		if (index != NOT_FOUND)		{			GT2ConnectionCallbacks aCallbacks;						aCallbacks.closed = gsUdpClosedRoutingCB;			aCallbacks.connected = gsUdpConnectedRoutingCB;			aCallbacks.ping = gsUdpPingRoutingCB;			aCallbacks.received = gsUdpReceivedRoutingCB;	       			// Automatically accept connections for Message Handlers			gt2Accept(aRemotePeer.mConnection, &aCallbacks);				gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Network, GSIDebugLevel_Comment, 				"[Udp Engine] Connection attempt auto-accepted for message handler/n");			return;		}	}	// all other messages go to the app	if (aUdp->mAppConnAttempt) 	{		gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Network, GSIDebugLevel_Comment, 			"[Udp Engine] Connection attempt from %s, asking app to accept/reject/n", gt2AddressToString(ip, port, anAddr));		aUdp->mAppConnAttempt(ip, port, latency, (unsigned char *)message, (unsigned int)len, aUdp->mAppUserData);	}	else 	{		// Reject any un-handled connections or unknown connections		gt2Reject(connection, NULL, 0);		ArrayRemoveAt(aUdp->mRemotePeers, ArrayLength(aUdp->mRemotePeers) -1);	}	GSI_UNUSED(socket);	GSI_UNUSED(anAddr);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:62,


示例15: gviCustomCapturePacket

static GVBool gviCustomCapturePacket(GVDevice device, GVByte * packet, int * len, GVFrameStamp * frameStamp, GVScalar * volume){	// not supported with custom devices	assert(0);	GSI_UNUSED(device);	GSI_UNUSED(packet);	GSI_UNUSED(len);	GSI_UNUSED(frameStamp);	GSI_UNUSED(volume);	return GVFalse;}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:11,


示例16: PersDataSaveCallback

static void PersDataSaveCallback(int localid, int profileid, persisttype_t type, int index, int success, time_t modified, void *instance){	printf("Data save callback: localid: %d profileid: %d success: %d mod: %d/n", localid, profileid, success, (int)modified);	/*********	instance is a pointer to the callback counter, increment it	**********/	(*(int *)instance)++;		GSI_UNUSED(type);	GSI_UNUSED(index);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:11,


示例17: PersDataCallback

static void PersDataCallback(int localid, int profileid, persisttype_t type, int index, int success, time_t modified, char *data, int len, void *instance){	printf("Data get callback: localid: %d profileid: %d success: %d mod: %d len: %d data: %s/n",localid, profileid, success, (int)modified, len, data);	/*********	instance is a pointer to the callback counter, increment it	**********/	(*(int *)instance)++;		GSI_UNUSED(type);	GSI_UNUSED(index);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:11,


示例18: submitReportCallback

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// This will be triggered when scSubmitReport() has completed//    Expected to occur once per call to scSetReportIntentionvoid submitReportCallback(SCInterfacePtr theInterface, 						  GHTTPResult theHttpResult,						  SCResult theResult,						  void * theUserData){	gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Notice, 		"SubmitReportCallback: theHttpResult = %d, theResult = %s/r/n", theHttpResult, SCResultStr[theResult]);		gServerData.mWaitCount--; // one less request to wait for	GSI_UNUSED(theHttpResult);	GSI_UNUSED(theResult);	GSI_UNUSED(theInterface);	GSI_UNUSED(theUserData);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:19,


示例19: GSI_UNUSED

static void ConnectCallback(	PEER peer,	PEERBool success,	int failureReason,	void * param){	connectSuccess = success;		GSI_UNUSED(peer);	GSI_UNUSED(success);	GSI_UNUSED(failureReason);	GSI_UNUSED(param);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:15,


示例20: sciReportSetPlayerAuthInfo

SCResult SC_CALL sciReportSetPlayerAuthInfo(SCIReport * theReport, gsi_u32 thePlayerIndex, const GSLoginCertificate * theCertificate, const gsi_u8 theAuthHash[16]){	SCIReportHeader * aHeader = (SCIReportHeader*)theReport->mBuffer.mData;	gsi_u32 authDataOffset = 0;	// Auth section is just after the roster	authDataOffset = sizeof(SCIReportHeader) + aHeader->mRosterSectionLength;	authDataOffset += SC_REPORT_AUTHDATA_LENGTH * thePlayerIndex;	// copy auth data into the buffer	// &theReport->mBuffer.mData[authDataOffset]	GSI_UNUSED(theAuthHash);	GSI_UNUSED(theCertificate);	return SCResult_NO_ERROR;}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:15,


示例21: switch

const char *ServerBrowserErrorDescA(ServerBrowser sb, SBError error){	switch (error)	{	case sbe_noerror:		return "None";		//break;	case sbe_socketerror:		return "Socket creation error";		//break;	case sbe_dnserror:		return "DNS lookup error";		//break;	case sbe_connecterror:		return "Connection failed";		//break;	case sbe_dataerror:		return "Data stream error";		//break;	case sbe_allocerror:		return "Memory allocation error";		//break;	case sbe_paramerror:		return "Function parameter error";		//break;	case sbe_duplicateupdateerror:		return "Duplicate update request error";		//break;	}	GSI_UNUSED(sb);	return "";}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:33,


示例22: SBServerGetPublicAddress

void CSbmfcsampleDlg::SBCallback(ServerBrowser serverBrowser, SBCallbackReason reason, SBServer server, void *instance){	CString str;	CSbmfcsampleDlg * dlg = (CSbmfcsampleDlg *)instance;	CString address;	if(server)		address.Format("%s:%d", SBServerGetPublicAddress(server), SBServerGetPublicQueryPort(server));	switch(reason)	{	case sbc_serveradded:		dlg->AddServer(server, TRUE);		break;	case sbc_serverupdated:		dlg->AddServer(server, TRUE);		break;	case sbc_serverupdatefailed:		break;	case sbc_serverdeleted:		dlg->RemoveServer(server);		break;	case sbc_updatecomplete:		dlg->m_progress.SetPos(100);		break;	case sbc_queryerror:		str.Format("Query Error: %s/n", ServerBrowserListQueryError(dlg->m_serverBrowser));		dlg->MessageBox(str);		break;	}		GSI_UNUSED(serverBrowser);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:33,



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


C++ GSL_ERROR_NULL函数代码示例
C++ GSIZE_TO_POINTER函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。