Re: [Gambas-user] server socket problem

2009-05-24 Thread Ron_1st
On Sunday 24 May 2009, guiodic wrote: > I can measure the WRITE execution time. > This would be usefus to get the real trasfer rate: If WRITE take a second, > the transer rate is 1KB/s. > Is it correct? > No, this is not correct. My internet connection is 20Mbits (20/8 = 2500 KByte/second) When

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
Ok, this is the test: code: tempo = Timer() WRITE #LAST, b, Len(b) WAIT pausa tempo = Timer() - tempo ' tempo di esecuzione della WRITE in s PRINT tempo where: pausa= 1/5 s = 0.20 then max transer rate is 5 kb/s wget wget --limit-rate=1k This is (part of) the output: 0,2031 0,200164

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
guiodic wrote: > > > > guiodic wrote: >> >> This is the solution, I think. >> > > Damn, It doesn't work. > > I have modified the code: I put print timer() before and after the WRITE: > > PRINT Timer() > WRITE #LAST, b, Len(b) > WAIT pausa > PRINT Timer() > > with pause=0.5 (=2kb/s) an

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
guiodic wrote: > > This is the solution, I think. > Damn, It doesn't work. I have modified the code: I put print timer() before and after the WRITE: PRINT Timer() WRITE #LAST, b, Len(b) WAIT pausa PRINT Timer() with pause=0.5 (=2kb/s) and wget set for 1 kb/s well, this is the output: 2

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
Benoît Minisini wrote: > >> Benoît Minisini wrote: >> > But you can enhance your code by fixing your "WAIT pause" instruction. >> > >> > If WRITE blocks, then you must take its execution time into account, >> and >> > lower >> > the pause accordingly. >> > >> > Regards, >> > >> > -- >> > Benoît

Re: [Gambas-user] server socket problem

2009-05-24 Thread Benoît Minisini
> Benoît Minisini wrote: > > But you can enhance your code by fixing your "WAIT pause" instruction. > > > > If WRITE blocks, then you must take its execution time into account, and > > lower > > the pause accordingly. > > > > Regards, > > > > -- > > Benoît > > oh. yes! > I can measure the W

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
Benoît Minisini wrote: > > But you can enhance your code by fixing your "WAIT pause" instruction. > > If WRITE blocks, then you must take its execution time into account, and > lower > the pause accordingly. > > Regards, > > -- > Benoît > > oh. yes! I can measure the WRITE exec

Re: [Gambas-user] Gambas-user Digest, Vol 36, Issue 53

2009-05-24 Thread Andreas Müller
Hello Werner, thanks for answer. I have found a solution by appending the printer coordinates to a binary file during calculation of the drawing area plot points. As I said, it is not clear when the plotting is finished, because it can be interactive, so I have some problems to calculate the compl

Re: [Gambas-user] server socket problem

2009-05-24 Thread Benoît Minisini
> Benoît Minisini wrote: > > I'm afraid I won't be able to fix that for Gambas 2.x. > > > > Regards, > > > > -- > > Benoît > > > :( > > Well, thank you. But you can enhance your code by fixing your "WAIT pause" instruction. If WRITE blocks, then you must take its execution time into account, and

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
Benoît Minisini wrote: > > I'm afraid I won't be able to fix that for Gambas 2.x. > > Regards, > > -- > Benoît > > > :( Well, thank you. -- View this message in context: http://www.nabble.com/server-socket-problem-tp23697722p23698223.html Sent from the gambas-user mailing list archi

Re: [Gambas-user] server socket problem

2009-05-24 Thread Benoît Minisini
> Benoît Minisini wrote: > > The WRITE instruction will block your program if the internal socket > > buffer is > > full because the reader is not fast enough to get it. > > Thank you Benoit. > But, how can to workaround this? You raise a point there. There is no code in the gb.net component to wa

Re: [Gambas-user] Possible Error In EXEC and SHELL cmd: kdesu vs gksu

2009-05-24 Thread Benoît Minisini
> This is the example very simple, but it only works 10% of the time. > > Benoît, can you see if there is a problem. > > I know about using Input Output instead of Read write. But this example > only works sometimes. Very strange. > > It when it fails it does not wait for a password entry. > > I ha

Re: [Gambas-user] server socket problem

2009-05-24 Thread guiodic
Benoît Minisini wrote: > > The WRITE instruction will block your program if the internal socket > buffer is > full because the reader is not fast enough to get it. > Thank you Benoit. But, how can to workaround this? -- View this message in context: http://www.nabble.com/server-socket-pr

Re: [Gambas-user] server socket problem

2009-05-24 Thread Benoît Minisini
> Hi to all! > > I have a problem with server socket. > > I made a little http server with Gambas. This server must send large > file, so it read 1KB from the file, write it and wait. The wait is > calculated to fit the max band chosed by the server administrator. > So if the max band is 1KB/s the

[Gambas-user] server socket problem

2009-05-24 Thread guido iodice
Hi to all! I have a problem with server socket. I made a little http server with Gambas. This server must send large file, so it read 1KB from the file, write it and wait. The wait is calculated to fit the max band chosed by the server administrator. So if the max band is 1KB/s the pause is 1 sec

Re: [Gambas-user] Array Filtering

2009-05-24 Thread Dimitris Anogiatis
On Sun, May 24, 2009 at 11:04 AM, Doriano Blengino < doriano.bleng...@fastwebnet.it> wrote: > Dimitris Anogiatis ha scritto: > > Hey guys, > > > > I was wondering if there's a way to filter an array without having to go > > through the whole thing > > > > But, the whole thing would be 4 or 5 lin

Re: [Gambas-user] Array Filtering

2009-05-24 Thread Doriano Blengino
Dimitris Anogiatis ha scritto: > Hey guys, > > I was wondering if there's a way to filter an array without having to go > through the whole thing > But, the whole thing would be 4 or 5 lines of code... it is not so much... > I've been experimenting with the Find method of the String[] but it onl

Re: [Gambas-user] Two extended paint devices at the same time ?

2009-05-24 Thread Werner
Andreas Müller wrote: > Hello, > > I have an application wich generates plotting points (x,y) which are > drawn by a draw.line(x1,y,1,x2,y2) command into some drawing area 'DA'. > > Draw.Begin(DA) > Draw.ForeColor = Color.Black > Draw.LineStyle = Line.Solid > Draw.Li

[Gambas-user] Two extended paint devices at the same time ?

2009-05-24 Thread Andreas Müller
Hello, I have an application wich generates plotting points (x,y) which are drawn by a draw.line(x1,y,1,x2,y2) command into some drawing area 'DA'. Draw.Begin(DA) Draw.ForeColor = Color.Black Draw.LineStyle = Line.Solid Draw.LineWidth = 1 (.. calcu

Re: [Gambas-user] Question about object creation ?

2009-05-24 Thread Doriano Blengino
Olivier Cruilles ha scritto: > Hi, > > > I would like to create a new application to learn how to create > dynamically object on a Form. > > All that I created since I know Gambas is by drawing object on the IDE > of Gambas. > > So, my idea is to create a form and inside the possibility to add