///
///\83\8b\81[\83v
///
-static unsigned int loopCommon(NicoLiveStream_P self,WSAEVENT sendEvent,WSAEVENT resetEvent ,NicoLiveOnSend nicoLiveOnSend);
+static unsigned int loopCommon(NicoLiveStream_P self,WSAEVENT sendEvent,WSAEVENT resetEvent ,NicoLiveOnSend nicoLiveOnSend,LPDWORD time);
///
///\83R\83\81\83\93\83g\89ð\90Í\8aÖ\90\94
///
VOID NicoLiveStream_setHeartBeatMsec(NicoLiveStream_P self,DWORD msec){
- WSASetEvent(self->chatManager.setHeartBeatTimeEvent);
+
self->chatManager.heartBeatTime = msec;
+ WSASetEvent(self->chatManager.setHeartBeatTimeEvent);
return;
}
///
VOID NicoLiveStream_setKeapALiveMsec(NicoLiveStream_P self,DWORD msec){
- WSASetEvent(self->chatManager.setKeepAliveTimeEvent);
+
self->chatManager.keepAliveTime = msec;
-
+ WSASetEvent(self->chatManager.setKeepAliveTimeEvent);
return;
}
NicoLiveStream_P self = (NicoLiveStream_P)lpBuffer;
- rslt = loopCommon(self,self->chatManager.setKeepAliveTimeEvent,self->chatManager.resetEvents[2],self->chatManager.onKeepAlliveSend);
+ rslt = loopCommon(self,self->chatManager.setKeepAliveTimeEvent,self->chatManager.resetEvents[2],self->chatManager.onKeepAlliveSend,&self->chatManager.keepAliveTime);
_endthreadex(rslt);
NicoLiveStream_P self = (NicoLiveStream_P)lpBuffer;
- rslt = loopCommon(self,self->chatManager.setHeartBeatTimeEvent,self->chatManager.resetEvents[1],self->chatManager.onHeartBeatSend);
+ rslt = loopCommon(self,self->chatManager.setHeartBeatTimeEvent,self->chatManager.resetEvents[1],self->chatManager.onHeartBeatSend,&self->chatManager.heartBeatTime);
return rslt;
}
-static unsigned int loopCommon(NicoLiveStream_P self,WSAEVENT sendEvent,WSAEVENT resetEvent ,NicoLiveOnSend nicoLiveOnSend){
+static unsigned int loopCommon(NicoLiveStream_P self,WSAEVENT sendEvent,WSAEVENT resetEvent ,NicoLiveOnSend nicoLiveOnSend,LPDWORD time){
unsigned int rslt = 0;
WSAEVENT events[3] = {self->chatManager.deleteEvent,self->chatManager.startEvent,self->chatManager.endEvent}; //\83C\83x\83\93\83g\94z\97ñ
while(TRUE){
WSAResetEvent(sendEvent);
- endResult = WSAWaitForMultipleEvents(sizeof(streamEvent) / sizeof(streamEvent[0]),streamEvent,FALSE,self->chatManager.heartBeatTime,FALSE);
+ endResult = WSAWaitForMultipleEvents(sizeof(streamEvent) / sizeof(streamEvent[0]),streamEvent,FALSE,*time,FALSE);
if(endResult == WSA_WAIT_TIMEOUT){