예제 #1
0
	void TLServer_IP::SrvGotTick(TLTick tick)
	{
		if (tick.sym=="") return;
		for (uint i = 0; i<stocks.size(); i++)
			for (uint j = 0; j<stocks[i].size(); j++)
			{
				if (stocks[i][j]==tick.sym)
					TLSend(TICKNOTIFY,tick.Serialize(),client[i]);
			}
	}
예제 #2
0
void TLServer_WM::SrvGotTick(TLTick tick)
{
    // if tick has no symbol index, send it old way
    if (tick.symid<0)
    {

        for (uint i = 0; i<stocks.size(); i++)
            for (uint j = 0; j<stocks[i].size(); j++)
            {
                if (stocks[i][j]==tick.sym)
                    TLSend(TICKNOTIFY,tick.Serialize(),i);
            }
        return;
    }
    // otherwise get only clients by their index
    clientindex symclients = symclientidx[tick.symid];
    for (uint i = 0; i<symclients.size(); i++)
    {
        TLSend(TICKNOTIFY,tick.Serialize(),symclients[i]);
    }
}