[Gambas-devel] Net component patches

Daniel Campos daniel.campos at ...103...
Sat Nov 6 21:34:45 CET 2004


Hi:

 Here's to files to replace the old ones in the "net" component:

1º) CDnsClient.c --> fixes a bug that could generate a segmentation
fault when using DnsClient in synchronous mode.

2º) CNet.c --> Adds a static method to "Net" class: 

ToIp4(Cad As String) As String

This function evaluates a string, and returns a well-formated IP
address. This way, it is easier to check if an IP address is valid
(returns it), or is not valid (returns ""). For example:

"  216.051.31.112   " --> "216.51.31.112"
" 216.509.112.24 "  --> ""
"001.00.02.34  " --> "1.0.2.34"
... and so on

Specially for use in values from a textbox filled by a non-expert
user :-)))

Regards,

Daniel Campos

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CDnsClient.c
Type: text/x-csrc
Size: 15018 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20041106/4a7a47d4/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CNet.c
Type: text/x-csrc
Size: 3136 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20041106/4a7a47d4/attachment-0001.c>


More information about the Devel mailing list