[Gambas-user] HttpClient question, now massively parallel!
Demosthenes Koptsis
demosthenesk at ...626...
Wed Mar 30 15:14:43 CEST 2011
As we speak about highlighters there is
GeSHi
http://qbnz.com/highlighter/
and it supports GAMBAS!
Also i found an addon for OO for highlighting
COOder
http://extensions.services.openoffice.org/node/940
it supports vb and some other.
it is based on GeSHi
and i hope soon to be updated including Gambas highlighting!
On Wed, 2011-03-30 at 13:36 +0200, Caveat wrote:
> Hi Ron_2nd,
>
> Benoit is (need I say it!) 100% correct.
>
> But I figured out a kind of simplistic way to allow you to do your gets
> in a MASSIVELY PARALLEL fashion... :-D
>
> http://pastebin.com/LiY3g4Lt
>
>
> Oh and Rolf, I notice PasteBin has a specific Gambas syntax highlighter
> already :-D
>
> Regards,
> Caveat
>
>
> On Wed, 2011-03-30 at 01:54 +0200, Benoît Minisini wrote:
> > > It seems that if you call HttpClient twice after each other with
> > > different urls in async mode, like in example below the _finished event
> > > is only called once (with the last call/url)
> > >
> > > So they are not really async/background, or is this a bug?
> > > Or are they overwritten, due to false usage/code?
> > >
> > > This happens in Gambas2 and 3...
> > >
> > > ' Gambas module
> > >
> > > Public hPachubeFetch As HttpClient
> > >
> > > Public Sub Main()
> > >
> > > Dim rFeeds As String[] = ["21017", "3711"]
> > > Dim sUrl, sFeed As String
> > >
> > > For Each sFeed In rFeeds
> > > Debug sfeed
> > > hPachubeFetch = New HttpClient As "hPachubeFetch"
> > > hPachubeFetch.URL = sUrl
> > > hPachubeFetch.TimeOut = 8
> > > hPachubeFetch.Tag = sFeed & "|0|12" ' feed | datastream | device id
> > > hPachubeFetch.Auth = 1
> > > hPachubeFetch.User = "user"
> > > hPachubeFetch.Password = "password"
> > > hPachubeFetch.Async = True
> > > hPachubeFetch.Get()
> > > Next
> > >
> > > End
> > >
> > > Public Sub hPachubeFetch_Finished()
> > >
> > > 'do stuff
> > >
> > > End
> > >
> > > Regards,
> > > Ron_2nd.
> > >
> >
> > I think you have to keep reference on the HttpClient object until the Get() is
> > finished. Otherwise the Finished event will be lost.
> >
> > Regards,
> >
> >
>
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Regards,
Demosthenes
More information about the User
mailing list