[Gambas-user] not able to send UDP datagram on local host

Benoît Minisini g4mba5 at gmail.com
Thu Sep 3 23:39:38 CEST 2020


Le 03/09/2020 à 19:58, T Lee Davidson a écrit :
> On 9/2/20 5:34 PM, T Lee Davidson wrote:
>> On 9/2/20 5:09 PM, Benoît Minisini wrote:
>>> I just set the TargetPort property of UdpCmd to 50000, and everything 
>>> works as expected (I see "Test-1" in the left textarea).
>>>
>>> If you don't set the Broadcast property, then you have to set the 
>>> TargetHost to 127.0.0.1.
>>
>> No matter how I've tried to configure the sockets, I keep getting a 
>> SegFault:
>> QSocketNotifier: Invalid socket 14 and type 'Read', disabling...
>>
> 
> Correction: Whether or not the Broadcast property is set, if TargetHost 
> is blank I get the SegFault.

Do you use the latest development version?

> 
> If I set TargetHost to 127.255.255.255, or to 0, it works as expected. 
> Should the IDE prevent TargetHost and TargetPort from being blank if 
> Broadcast is set?

No. A void string means "any address". Maybe it should be replaced by 
127.0.0.1 when Broadcast is *not* set.

> 
> By the way, if I put any value in the UdpSocket's Group property, at Run 
> I get:
> Unknown symbol 'Name' in class 'UdpSocket'

This has been fixed in the last commit. You will have to modify the form 
and save it again to fix it.

Regards,

-- 
Benoît Minisini


More information about the User mailing list