Friday, September 23, 2005
Do you ever wonder why You never win the lotto?
From: "Your Lucky Numbers" <HTULH@vorherzusehen.from.whatsnexttoday.com>
Reply-To: <HTULH@service.reply.whatsnexttoday.com>
Date: Fri, 23 Sep 2005 18:59:34 -0400
Subject: Do you ever wonder why You never win the lotto?
http://vorherzusehen.whatsnexttoday.com/NDNZhzM7UYA6NlqPOjBZhzoyVoI2NFuPOjBZhjo5WYQx/
.GetHostName(), "TraceViewMain"); Messenger oMessenger = new Messenger(); BusinessMessage oMessageIn = oMessenger.MessageInfo; BusinessMessage oMessageOut; try { // must set the message type we are looking // for, this looks in the correct queue oMessageIn.MessageType = "trace"; while (true) { // grab the message from the queue WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Listening for trace messages on the trace queue..."); oMessageOut = oMessenger.Receive( oMessageIn, 10); string sSource = oMessageOut.UserId; string sDate = DateTime.Now.ToShortDateString(); string sTime = DateTime.Now.ToShortTimeString(); string sMessage = oMessageOut.MessageText; sMessage = sMessage.Replace('\n', '-'); frmSocketServer.dsQueuedTraceData .TraceMessage .AddTraceMessageRow( sDate, sTime, sSource, sMessage); frmSocketServer.dsQueuedTraceData .TraceMessage .AcceptChanges(); } } catch (Exception e) { // exception was probably thrown when no message // could be found/timeout expired if (e.Message.StartsWith("Timeout")) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Timeout expired listening for messages on trace queue."); } else { oElog.WriteEntry("SocketServer - Error Occurred During Message Receipt and Processing: " + e.ToString()); } } } private void StopListening() { cmdListen.Enabled = true; cmdStop.Enabled = false; cmdRefresh.Enabled = false; if (oSocket != null) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Closing Socket ..." + oSocket.LocalEndPoint.ToString()); oSocket.Close(); oSocket = null; } if (oListener != null) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Stopping Listener ..." + oListener.LocalEndpoint.ToString()); oListener.Stop(); oListener = null; } if (oQueuedTraceTimer != null) oQueuedTraceTimer.Dispose(); if (oActiveTraceTimer != null) oActiveTraceTimer.Dispose(); } /// /// Delegated event method to process socket streamed trace /// messages /// /// static void ProcessActiveTrace(Object state) { EventLog oElog = new EventLog("Application", Dns.GetHostName(), "TraceViewMain"); string sSource = null; int nDelimPos = 0; try { if (oListener == null) { long lIP = Dns.GetHostByName( Dns.GetHostName()).AddressList[0] .Address; IPAddress ipAd = new IPAddress(lIP); oListener = new TcpListener(ipAd, 8001); oListener.Start(); WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "The server is running at port 8001. .."); WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "The local End point is :" + oListener.LocalEndpoint); while (true) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Waiting for a connection on : "
Reply-To: <HTULH@service.reply.whatsnexttoday.com>
Date: Fri, 23 Sep 2005 18:59:34 -0400
Subject: Do you ever wonder why You never win the lotto?
http://vorherzusehen.whatsnexttoday.com/NDNZhzM7UYA6NlqPOjBZhzoyVoI2NFuPOjBZhjo5WYQx/
.GetHostName(), "TraceViewMain"); Messenger oMessenger = new Messenger(); BusinessMessage oMessageIn = oMessenger.MessageInfo; BusinessMessage oMessageOut; try { // must set the message type we are looking // for, this looks in the correct queue oMessageIn.MessageType = "trace"; while (true) { // grab the message from the queue WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Listening for trace messages on the trace queue..."); oMessageOut = oMessenger.Receive( oMessageIn, 10); string sSource = oMessageOut.UserId; string sDate = DateTime.Now.ToShortDateString(); string sTime = DateTime.Now.ToShortTimeString(); string sMessage = oMessageOut.MessageText; sMessage = sMessage.Replace('\n', '-'); frmSocketServer.dsQueuedTraceData .TraceMessage .AddTraceMessageRow( sDate, sTime, sSource, sMessage); frmSocketServer.dsQueuedTraceData .TraceMessage .AcceptChanges(); } } catch (Exception e) { // exception was probably thrown when no message // could be found/timeout expired if (e.Message.StartsWith("Timeout")) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Timeout expired listening for messages on trace queue."); } else { oElog.WriteEntry("SocketServer - Error Occurred During Message Receipt and Processing: " + e.ToString()); } } } private void StopListening() { cmdListen.Enabled = true; cmdStop.Enabled = false; cmdRefresh.Enabled = false; if (oSocket != null) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Closing Socket ..." + oSocket.LocalEndPoint.ToString()); oSocket.Close(); oSocket = null; } if (oListener != null) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Stopping Listener ..." + oListener.LocalEndpoint.ToString()); oListener.Stop(); oListener = null; } if (oQueuedTraceTimer != null) oQueuedTraceTimer.Dispose(); if (oActiveTraceTimer != null) oActiveTraceTimer.Dispose(); } /// /// Delegated event method to process socket streamed trace /// messages /// /// static void ProcessActiveTrace(Object state) { EventLog oElog = new EventLog("Application", Dns.GetHostName(), "TraceViewMain"); string sSource = null; int nDelimPos = 0; try { if (oListener == null) { long lIP = Dns.GetHostByName( Dns.GetHostName()).AddressList[0] .Address; IPAddress ipAd = new IPAddress(lIP); oListener = new TcpListener(ipAd, 8001); oListener.Start(); WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "The server is running at port 8001. .."); WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "The local End point is :" + oListener.LocalEndpoint); while (true) { WriteStatus(DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), "Waiting for a connection on : "







