Re: [twsocket] best way for packet routing

2012-02-28 Thread Emanuele Bizzarri
Hi,
yes I know that packets are biggest than 4 bytes on wire, I'm telling
about payload only.
[40(eth)+20(ip)+20(tcp)+4(payload)]*1000(pktps)*8(bits)*500(clients)=336Mbps1Gbps

My intention is to stress the software and understand what happens in
critical situations. If I use bigger packets I can easily saturate the
gigabit switch, but what I want is to send a lot of packets to a lot of
clients using less bandwidth as possible.

Do you think that routing cicle is ok? There is a better way to do that?
Can you give any advice about that?

Thank you



Il 27/02/2012 20:50, François Piette ha scritto:
 For this I configured each client to send about 1000 packets per second of
 4 bytes (about 32Kbps).

 Your bps computation is wrong. You send 4 data bytes, the actual packets on
 the network are much larger (something like 10 times) ! Have a lokk there:
 http://sd.wareonearth.com/~phil/net/overhead/

 You should avoid transmitting such small packet. It is better to aggregate
 small packets into larger ones.

   fSS.Client [i]. Send (fRxData, lSize)
 Add a try/except block around that line.

 --
 francois.pie...@overbyte.be
 The author of the freeware multi-tier middleware MidWare
 The author of the freeware Internet Component Suite (ICS)
 http://www.overbyte.be


 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be


-- 
Ing. Emanuele Bizzarri
Software Development Department
e-works s.r.l.
41011 - Campogalliano - Modena - Italy 
tel. +39 059 2929081 int. 23
fax +39 059 2925035

e-mail: e.bizza...@e-works.it - http://www.e-works.it
-
La presente comunicazione, che potrebbe contenere informazioni riservate e/o 
protette da segreto professionale, è indirizzata esclusivamente ai destinatari 
della medesima qui indicati. Le opinioni, le conclusioni e le altre 
informazioni qui contenute, che non siano relative alla nostra attività 
caratteristica, devono essere considerate come non inviate né avvalorate da 
noi. Tutti i pareri e le informazioni qui contenuti sono soggetti ai termini ed 
alle condizioni previsti dagli accordi che regolano il nostro rapporto con il 
cliente. Nel caso in cui abbiate ricevuto per errore la presente comunicazione, 
vogliate cortesemente darcene immediata notizia, rispondendo a questo stesso 
indirizzo di e-mail, e poi procedere alla cancellazione di questo messaggio dal 
Vostro sistema. E' strettamente proibito e potrebbe essere fonte di violazione 
di legge qualsiasi uso, comunicazione, copia o diffusione dei contenuti di 
questa comunicazione da parte di chi la abbia ricevuta per errore o in 
violazione degli scopi della presente. 
-
This communication, that may contain confidential and/or legally privileged 
information, is intended solely for the use of the intended addressees. 
Opinions, conclusions and other information contained in this message, that do 
not relate to the official business of this firm, shall be considered as not 
given or endorsed by it. Every opinion or advice contained in this 
communication is subject to the terms and conditions provided by the agreement 
governing the engagement with such a client. If you have received this 
communication in error, please notify us immediately by responding to this 
email and then delete it from your system. Any use, disclosure, copying or 
distribution of the contents of this communication by a not-intended recipient 
or in violation of the purposes of this communication is strictly prohibited 
and may be unlawful.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SSL ErrCode 3

2012-02-28 Thread Marko Paunovic
I have problem with SSL components from ICS Overbyte package. I have 
similar problem like this person here:


http://www.archivum.info/twsocket@elists.org/2007-02/00013/(twsocket)-SSL-ErrCode-3.html 



What happens is that everything works on my machine perfectly, but when 
I copy my application to another machine, I get ErrCode 3 in 
OnRequestDone() event of http ssl component.


I am unable to find ICS SSL list Arno mentioned, from April 2006, to 
check for answer about fix.
I don't call .Abort() anywhere in code, which would cause this error. 
Here is how I do the operations:


[code]
procedure TCertificateWindow.btDownloadCert(Sender: TObject);
begin
  sslClient.URL := ebAddCert.Text;
  If Pos('https://', LowerCase(sslClient.URL))  1 Then
sslClient.URL := 'https://' + sslClient.URL;
  sslClient.GetAsync;
end;

procedure TCertificateWindow.sslClientSslHandshakeDone(Sender: TObject; 
ErrCode: Word; PeerCert: TX509Base; var Disconnect: Boolean);

begin
  Disconnect := FALSE;
end;

procedure TCertificateWindow.sslClientSslVerifyPeer(Sender: TObject; var 
Ok: Integer; Cert: TX509Base);

begin
  Certificates.AddCertificate(Cert.GetRawText);

  Ok := 1;
end;
[/code]

What happens after .GetAsync() is that none of these events get called. 
I debugged further, and figured out that OnSocketError(Sender: TObject); 
event gets called, but when I check values of 
sslClient.CtrlSocket.LastError and sslClient.CtrlSocket.LastSslError 
inside that event, they are zero. I have also tried to call non-async 
.Get(), but I get same error.


However, when I check CtrlSocket.LastError value in OnRequestDone() 
event, it is 10035 (WSAEWOULDBLOCK).


I use latest ICS package and tested on machine without firewall and AV. 
Does anyone know what the problem could be ?


Thanks in advance, Marko.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] OFF: string issues while porting WebSockets server to BDS 2010

2012-02-28 Thread Stan

Apologies for the disturbance, I've found the solution - AnsiChar.
Now all is working fine.

- Original Message - 
From: Stan 
To: ICS support mailing 
Sent: Tuesday, February 28, 2012 10:43 PM

Subject: OFF: string issues while porting WebSockets server to BDS 2010


Hi,

I have a working WebSockets server for ICS, which I plan to share.
It is implemented initially in Delphi 7. Now I try to port it to BDS2010
and have some issues with strings.

First, I replaced all 'string's with 'AnsiString's, and this seems working as
expected. But Chr function produces a problem. If I have an AnsiString
str, and try to call str := Chr(b), where b is Byte with value 129, I get
the symbol '?', which should normally be another non-standard so to
speak character.

So the question is, how to use Chr in BDS without any smart
interferences, or how can I pack bytes in a AnsiString without using
Chr?

Thanks in advance,
Stan
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] OFF: string issues while porting WebSockets server to BDS 2010

2012-02-28 Thread Stan

Hi,

I have a working WebSockets server for ICS, which I plan to share.
It is implemented initially in Delphi 7. Now I try to port it to BDS2010
and have some issues with strings.

First, I replaced all 'string's with 'AnsiString's, and this seems working as
expected. But Chr function produces a problem. If I have an AnsiString
str, and try to call str := Chr(b), where b is Byte with value 129, I get
the symbol '?', which should normally be another non-standard so to
speak character.

So the question is, how to use Chr in BDS without any smart
interferences, or how can I pack bytes in a AnsiString without using
Chr?

Thanks in advance,
Stan
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] best way for packet routing

2012-02-28 Thread François Piette
 Do you think that routing cicle is ok? There is a better way to do that?
 Can you give any advice about that?

How do you solve the issue which can happen if a client is not receiving
data fast enough ? The sending socket will buffer data (It is asynchronous
on send as well) and all memory could be consumed if you don't kill client
which do not receive data, or at least delete some data (the oldest or the
newest).

Also, with your system, data is duplicated as much as you have clients. This
is a waste of memory and will not scale up nicely.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] OFF: string issues while porting WebSockets server to BDS 2010

2012-02-28 Thread François Piette
Be sure to use latest ICS which has been ported to unicode enabled Delphi
versions such as D2010.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Stan
Envoyé : mardi 28 février 2012 21:01
À : ICS support mailing
Objet : Re: [twsocket] OFF: string issues while porting WebSockets server to
BDS 2010

Apologies for the disturbance, I've found the solution - AnsiChar.
Now all is working fine.

- Original Message -
From: Stan
To: ICS support mailing
Sent: Tuesday, February 28, 2012 10:43 PM
Subject: OFF: string issues while porting WebSockets server to BDS 2010


Hi,

I have a working WebSockets server for ICS, which I plan to share.
It is implemented initially in Delphi 7. Now I try to port it to BDS2010 and
have some issues with strings.

First, I replaced all 'string's with 'AnsiString's, and this seems working
as expected. But Chr function produces a problem. If I have an AnsiString
str, and try to call str := Chr(b), where b is Byte with value 129, I get
the symbol '?', which should normally be another non-standard so to speak
character.

So the question is, how to use Chr in BDS without any smart
interferences, or how can I pack bytes in a AnsiString without using Chr?

Thanks in advance,
Stan
--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be