/* * This function will send all logs within the logList while emptying the queue in the process. * These logs are sent to the Logstash Client running on the server end. */ public static Queue <string> PostAllLogs(UDPThreaded Connection, Queue <string> LogList) { if (DataAnalyticsStructure.GetPostRequestState() && DataAnalyticsStructure.GetConnectedState() && LogList != null && LogList.Count >= 1) { while (LogList.Count > 0 && Connection != null) { Connection.Send(LogList.Dequeue()); } } return(LogList); }
void Update() { //foreach (var message in connection.getMessages()) Debug.Log(message); connection.Send("Hi!"); }