[Gambas-user] UNIX SOCKETS

Charlie Reinl Karl.Reinl at ...2345...
Sat Apr 3 22:37:25 CEST 2010


Am Samstag, den 03.04.2010, 20:48 +0100 schrieb Chris Dunworth:
> Hi All,
> 
> I found the problem.
> 
> It seems   MySock.Connect("/var/run/gtm2")
> does require a port parameter
> 
> using
> 
> MySock.Connect("/var/run/gtm2", Net.local)
> 
> socket opens and works corectly.
> I found this info by browsing through cSocket.c source code in the
> bg.netcomponent.
>  /********************************************************************
>  Port to connect to. Can be 'Net.Local' for Unix sockets, or
>  1-65535 for TCP sockets
>  ********************************************************************/
> BEGIN_PROPERTY(CSOCKET_Port)
> 
>     if (READ_PROPERTY)
>     {
>         GB.ReturnInteger(THIS->iUsePort);
>         return;
>     }
> 
>     if (THIS->iStatus>0)
>     {
>         GB.Error("Port property can not be changed while working");
>         return;
>     }
>     if (VPROP(GB_INTEGER)<0)    { THIS->iUsePort=0; return; }
>     if (VPROP(GB_INTEGER)>65535)     { THIS->iUsePort=65535; return; }
>     THIS->iUsePort=VPROP(GB_INTEGER);
> 
> 
> END_PROPERTY
> /*********************************************************************
> 
> 
> 
> Charlie,
>  using a version that dates from Sep 2009 is hardly 'very old'
> 
> Regards,
> 
> Chris Dunworth
> 
> 
---------------8><----------------------

May be you think coders are lazy, because they let work machines.
But do you remember the speed of light? ;-)

you didn't read http://gambas.sourceforge.net/en/changelog2.html
because the last entry is version 2.20.2

2.20.2  2.20.1  2.20.0  2.19.0  2.18.0  2.17.0 all these versions and
about ~ 160 lines of documentation (not lines of code) between today
back to Sep 2009.

But you are right. NOT very old, but out dated !



-- 
Cordialement
Charlie





More information about the User mailing list