コード例 #1
0
ファイル: ILibSSDPClient.c プロジェクト: optman/upnpstack
void ILibSSDPClientModule_PostSelect(void* object,int slct, fd_set *readset, fd_set *writeset, fd_set *errorset)
{
	struct SSDPClientModule *module = (struct SSDPClientModule*)object;
	if(slct>0)
	{
		if(FD_ISSET(module->SSDPListenSocket,readset)!=0)
		{
			ILibReadSSDP(module->SSDPListenSocket,module);
		}
		if(FD_ISSET(module->MSEARCH_Response_Socket,readset)!=0)
		{
			ILibReadSSDP(module->MSEARCH_Response_Socket,module);
		}
	}
}
コード例 #2
0
void ILibSSDPClient_OnData(ILibAsyncUDPSocket_SocketModule socketModule,char* buffer, int bufferLength, int remoteInterface, unsigned short remotePort, void *user, void *user2, int *PAUSE)
{
    struct packetheader *packet;
    packet = ILibParsePacketHeader(buffer,0,bufferLength);
    if(packet==NULL) {
        return;
    }

    ILibReadSSDP(packet,remoteInterface,remotePort,(struct SSDPClientModule*)user);
    ILibDestructPacket(packet);
}