Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-10 Thread Thiago Macieira
On quarta-feira, 10 de outubro de 2012 11.03.21, Kevin Krammer wrote: > Not related to performance, but often the main reason to use techniques > such as QLocalSocket is better access control. > Any process (running as any user) on the machine can attempt a connect to a > TCP socket on the loopba

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-10 Thread Kevin Krammer
On Monday, 2012-10-08, Charley Bay wrote: > QUESTION: If you logically need a "network-socket" (LAN or WAN, but > sometimes accidentally on the same-computer), is there a *performance* > issue (or any reasonable design preference) where QLocalSocket would > be "preferable" to a QTcpSocket? (...i

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Richard Moore
On 9 October 2012 17:59, Thiago Macieira wrote: > The question is only whether there's more overhead in kernel mode. A quick > check over the cubicle wall here answers that there is a little overhead more > with TCP, since it must still verify the netfilter rules (think iptables). You should take

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Thiago Macieira
On terça-feira, 9 de outubro de 2012 17.27.52, Joerg Bornemann wrote: > On 09/10/2012 15:12, Giuseppe D'Angelo wrote: > >> There's AFAIK no "short cut" for pure localhost TCP > >> connections. > > > > There are. For instance, checksums are not computed nor checked for > > packets travelling through

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Konstantin Tokarev
09.10.2012, 01:23, "Charley Bay" : > Does the "MyLocalSocketOrTcpSocket" class seem stupid, or should I > just use "QTcpSocket" all the time? You can create your socket-enabled class as template taking either QTcpSocket or QLocalSocket, since APIs are mostly the same. -- Regards, Konstantin __

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Joerg Bornemann
On 09/10/2012 15:12, Giuseppe D'Angelo wrote: >> There's AFAIK no "short cut" for pure localhost TCP >> connections. > > There are. For instance, checksums are not computed nor checked for > packets travelling through the loopback interface. But there's still more overhead (e.g. context switches)

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Thiago Macieira
On terça-feira, 9 de outubro de 2012 14.42.32, Knoll Lars wrote: > > What you're asking for is an intermediate base between QAbstractSocket > > and > > QIODevice, but I'm not sure how much it's worth. What methods from > > QAbstractSocket do you need which are also common (same signature) > > betwe

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Knoll Lars
On Oct 9, 2012, at 4:32 PM, Thiago Macieira wrote: > On terça-feira, 9 de outubro de 2012 14.12.16, Giuseppe D'Angelo wrote: >> On 9 October 2012 13:03, Joerg Bornemann wrote: >>> There's AFAIK no "short cut" for pure localhost TCP >>> connections. >> >> There are. For instance, checksums are

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Thiago Macieira
On terça-feira, 9 de outubro de 2012 14.12.16, Giuseppe D'Angelo wrote: > On 9 October 2012 13:03, Joerg Bornemann wrote: > > There's AFAIK no "short cut" for pure localhost TCP > > connections. > > There are. For instance, checksums are not computed nor checked for > packets travelling through th

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Giuseppe D'Angelo
On 9 October 2012 13:03, Joerg Bornemann wrote: > There's AFAIK no "short cut" for pure localhost TCP > connections. There are. For instance, checksums are not computed nor checked for packets travelling through the loopback interface. Cheers, -- Giuseppe D'Angelo __

Re: [Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-09 Thread Joerg Bornemann
On 08/10/2012 23:23, Charley Bay wrote: > QUESTION: If you logically need a "network-socket" (LAN or WAN, but > sometimes accidentally on the same-computer), is there a *performance* > issue (or any reasonable design preference) where QLocalSocket would > be "preferable" to a QTcpSocket? (..

[Development] QTcpSocket, QLocalSocket, common-use-model?

2012-10-08 Thread Charley Bay
I stumbled across an interesting discussion from Feb-2008 about using QTcpSocket and QLocalSocket, which also suggested the design might be revisited post Qt5: http://blog.qt.digia.com/2008/02/22/qlocalserver-qlocalsocket/ REVIEW: - QTcpSocket (derived from QAbstractSocket) is really a network-