[Gambas-user] Newbie question: socket example
pf
petterfilip at gmail.com
Sun Jan 31 19:52:45 CET 2021
newbie Question
I try o use the Socket component. Enabled the component in a new project
and put in the example code from the help.
It got stuck on the ClsMain, "Unknown identifier"
Regards Chris
Paste from the help i use:
' Gambas class file STATIC App AS ClsMain PUBLIC MySock AS Socket PUBLIC
SUB MySock_Ready() WRITE #MySock,"Hello",5 END PUBLIC SUB MySock_Read()
DIM sCad AS String READ #MySock,sCad,Lof(MySock) PRINT sCad CLOSE
#MySock END PUBLIC SUB _New() MySock=NEW Socket AS "MySock"
MySock.Connect("name_of_host",3450) END PUBLIC SUB MySock_Error() PRINT
"Unable to connect" END STATIC PUBLIC SUB Main() App=NEW ClsMain END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210131/dbda393e/attachment.htm>
More information about the User
mailing list