コード例 #1
0
ファイル: Network.cpp プロジェクト: cameroncros/heatSync
void Network::listenLoop() {
	int sk;
	while (true) { //todo: needs error checking to close the connection afterwards, also should prehaps open connection here
		sk = sockListen();
		syncServers.push_back(SyncServer(new SecureConnection(sk, sslContext)));
	}
}
コード例 #2
0
void *SOCKET_ListenThread(void *lpParam)
{
	osPthreadSetSched(FC_SCHED_LIST, FC_PRIO_LIST);

  #if defined(RTS_CFG_TASK_TRACE)
	osTrace("--- TSK: Task '%s' created with pid %d.\r\n", TASK_NAME_COM_LIS, getpid());
  #endif

	sockListen((SComTCP *)lpParam);

  #if defined(RTS_CFG_TASK_TRACE)
	osTrace("--- TSK: Task '%s' terminated with pid %d.\r\n", TASK_NAME_COM_LIS, getpid());
  #endif

	pthread_detach(pthread_self());

	return NULL;
}