Exemple #1
0
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);
		}
	}
}
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);
}