Re: [twsocket] udp packet loss

2011-03-01 Thread emanuele bizzarri
Hi Francois, hi all I cannot reproduce the packet loss on localhost. Strange. I always lose some packets on localhost (at least setting Interval=0 on the client). I can reproduce on different computers, but I found a flaw in your design: remember TWSocket use non blocking. SendTo will fail

Re: [twsocket] udp packet loss

2011-03-01 Thread Francois PIETTE
01, 2011 10:11 AM Subject: Re: [twsocket] udp packet loss Hi Francois, hi all I cannot reproduce the packet loss on localhost. Strange. I always lose some packets on localhost (at least setting Interval=0 on the client). I can reproduce on different computers, but I found a flaw in your

Re: [twsocket] udp packet loss

2011-02-28 Thread Anton S.
var lBuffer:array[0..1500] of AnsiChar; I'd advice you not to allocate static buffer inside a method because it is placed inside the stack every time method is called. -- Anton -- To unsubscribe or change your settings for TWSocket mailing list please goto

Re: [twsocket] udp packet loss

2011-02-27 Thread emanuele bizzarri
Hi, I'll assume you use a direct cable or put wireshark at the receiving computer because sending a packet is not a problem. Having the packet reaching the network card of the receiving computer is a different thing if there is something in between. Yes, I use a cross cable and two laptop

Re: [twsocket] udp packet loss

2011-02-27 Thread Francois PIETTE
My client/server project size is only 12KB, is it possible to attach it to the mail? Someone could try it... It don't primize, but you may send the source code to me (no executable please) I will try to test it. Include complete projects so that I can test within a few minutes, and

Re: [twsocket] udp packet loss

2011-02-27 Thread emanuele bizzarri
Hi, now I've made a console application for the UDP server, but nothing changes. I see packet loss inside application, but all packets are correctly captured by wireshark. Thankyou, Emanuele Il 27/02/2011 15.09, Francois PIETTE ha scritto: My client/server project size is only 12KB, is it

Re: [twsocket] udp packet loss

2011-02-27 Thread Francois PIETTE
- Original Message - From: emanuele bizzarri e.bizza...@e-works.it To: twsocket@elists.org Sent: Sunday, February 27, 2011 7:05 PM Subject: Re: [twsocket] udp packet loss Hi, now I've made a console application for the UDP server, but nothing changes. I see packet loss inside application

[twsocket] udp packet loss

2011-02-26 Thread emanuele bizzarri
Hi, I've a problem with udp. Often my application detects packet losses. In order to systematically reproduce the problem, I've used the following configuration. I use 2 pc connected with a cross cable. The client sends udp numbered packets to the server. Packet size is 1460. One packet is sent

Re: [twsocket] udp packet loss

2011-02-26 Thread Francois PIETTE
I've a problem with udp. Often my application detects packet losses. At first glance, this is expected with UDP. By construction UDP is an unreliable transport. In order to systematically reproduce the problem, I've used the following configuration. I use 2 pc connected with a cross cable.

Re: [twsocket] udp packet loss

2011-02-26 Thread emanuele bizzarri
Hi Francois, thank you for your response. I've created the socket inside DoInit, that is an override method of the virtual DoInit of the worker thread. The DoInit method is called inside Execute method, so the socket is created by the thread and its messages are handled by it (try to use

Re: [twsocket] udp packet loss

2011-02-26 Thread Angus Robertson - Magenta Systems Ltd
As you can see in my code I've also try to set tpTimeCritical to thread priority, but without any success. Try changing the application priority: SetPriorityClass (GetCurrentProcess, HIGH_PRIORITY_CLASS); or even REALTIME_PRIORITY_CLASS, but this last one can be dangerous since Windows may

Re: [twsocket] udp packet loss

2011-02-26 Thread Francois PIETTE
As you can see Sorry, no time to examine it in details. Priority is given to my business customers... in my code I've also try to set tpTimeCritical to thread priority, but without any success. The worker thread check if expected packet number (first four bytes) corresponds to expected

Re: [twsocket] udp packet loss

2011-02-26 Thread emanuele bizzarri
Hi, I need to use udp because my application is an h323/sip endpoint. RTP uses udp sockets to transmit/receive audio/video data. RTCP can be used to manage packet loss. But in this case packets are not lost by the network. If I use wireshark I can see all the packets. I think that there is a

Re: [twsocket] udp packet loss

2011-02-26 Thread Francois PIETTE
I need to use udp because my application is an h323/sip endpoint. RTP uses udp sockets to transmit/receive audio/video data. RTCP can be used to manage packet loss. OK, good. But in this case packets are not lost by the network. If I use wireshark I can see all the packets. I'll assume you