Click here to Skip to main content
15,920,030 members
Home / Discussions / C#
   

C#

 
GeneralRe: premature garbage collection of static class causing problem Pin
akhanal17-Sep-09 5:25
akhanal17-Sep-09 5:25 
QuestionError in Loading assembly from Assembly.Load Pin
SRKSHOME17-Sep-09 3:31
SRKSHOME17-Sep-09 3:31 
AnswerRe: Error in Loading assembly from Assembly.Load Pin
Not Active17-Sep-09 4:19
mentorNot Active17-Sep-09 4:19 
AnswerRe: Error in Loading assembly from Assembly.Load Pin
Luc Pattyn17-Sep-09 4:20
sitebuilderLuc Pattyn17-Sep-09 4:20 
QuestionCalling GUI & path finding gurus Pin
izakfick17-Sep-09 3:27
izakfick17-Sep-09 3:27 
AnswerRe: Calling GUI & path finding gurus Pin
Pete O'Hanlon17-Sep-09 4:11
mvePete O'Hanlon17-Sep-09 4:11 
QuestionAllow space in text box - add the code for allowing spaces in regular expression validator Pin
coolsharath17-Sep-09 3:21
coolsharath17-Sep-09 3:21 
AnswerRe: Allow space in text box - add the code for allowing spaces in regular expression validator Pin
Calla17-Sep-09 3:40
Calla17-Sep-09 3:40 
GeneralRe: Allow space in text box - add the code for allowing spaces in regular expression validator Pin
coolsharath17-Sep-09 3:51
coolsharath17-Sep-09 3:51 
GeneralRe: Allow space in text box - add the code for allowing spaces in regular expression validator Pin
coolsharath17-Sep-09 4:06
coolsharath17-Sep-09 4:06 
GeneralRe: Allow space in text box - add the code for allowing spaces in regular expression validator Pin
Calla17-Sep-09 4:20
Calla17-Sep-09 4:20 
GeneralRe: Allow space in text box - add the code for allowing spaces in regular expression validator Pin
coolsharath17-Sep-09 4:26
coolsharath17-Sep-09 4:26 
GeneralRe: Allow space in text box - add the code for allowing spaces in regular expression validator Pin
OriginalGriff17-Sep-09 4:36
mveOriginalGriff17-Sep-09 4:36 
Questionhow one can programatically send keystroke, mouse move, mouse click Pin
Tridip Bhattacharjee17-Sep-09 2:18
professionalTridip Bhattacharjee17-Sep-09 2:18 
Questionhow to see datagrid print printpriview in c# windows. Pin
Ramesh Reddy1111117-Sep-09 2:17
Ramesh Reddy1111117-Sep-09 2:17 
AnswerRe: how to see datagrid print printpriview in c# windows. Pin
Henry Minute17-Sep-09 2:48
Henry Minute17-Sep-09 2:48 
QuestionWindows Service Credentials Pin
Sangioo17-Sep-09 2:09
Sangioo17-Sep-09 2:09 
QuestionContext menu for a text box. Pin
Pavan Navali17-Sep-09 1:45
Pavan Navali17-Sep-09 1:45 
AnswerRe: Context menu for a text box. Pin
Not Active17-Sep-09 1:49
mentorNot Active17-Sep-09 1:49 
GeneralRe: Context menu for a text box. Pin
Pavan Navali17-Sep-09 18:26
Pavan Navali17-Sep-09 18:26 
GeneralRe: Context menu for a text box. Pin
Not Active18-Sep-09 1:43
mentorNot Active18-Sep-09 1:43 
Questiondisabled hyperlink and write arrow cursor Pin
Idoshhh17-Sep-09 1:17
Idoshhh17-Sep-09 1:17 
AnswerRe: disabled hyperlink and write arrow cursor Pin
Not Active17-Sep-09 1:53
mentorNot Active17-Sep-09 1:53 
Questionmeasure received data/s for an udp multicast address [modified] Pin
collapo17-Sep-09 1:08
collapo17-Sep-09 1:08 
Hi
I'm trying to measure data from a multicast udp address.

To do this, i use a socket added to multicastgroup and this code:

while (!b)
{
    byte[] buffer = new byte[udpReceiver.Available];
    udpReceiver.Receive(buffer, 0, buffer.Length, SocketFlags.None, out err);
    if ((DateTime.Now - starttime).TotalSeconds < ((double)elem.timetowatch_ms / 1000))
    {
        newvalue += (ulong)buffer.Length;
    }
    else
    {
        newvalue += (ulong)buffer.Length;
        receivedByteNumber = ((Convert.ToUInt64((double)newvalue / (DateTime.Now - starttime).TotalSeconds)) / 128);
        newvalue = 0;
        starttime = DateTime.Now;
        b = true;
    }
 }


my problem that it is using about 50% of cpu time and if i place it in a thread
it shows less data (~4000kbits/sec) than if it is placed on a main thread (~7000) - possibly because of system time management, but i'm unsure.

Any better suggestion on data measuring on multicast udp with less cpu and regardless of this threadproblem?

Thanks in advance:
Collapo

modified on Thursday, September 17, 2009 7:14 AM

AnswerRe: measure received data/s for an udp multicast address Pin
Luc Pattyn17-Sep-09 2:32
sitebuilderLuc Pattyn17-Sep-09 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.