[Gambas-user] Problmes with sockets
Joe Boby
ngcsch at ...614...
Mon Jul 11 23:19:47 CEST 2005
This is what you need:
public const WhatEverName as ServerSocket
'' you can write this where you want of course
PUBLIC SUB _new()
WhatEverName = NEW ServerSocket AS "mySocksSmells"
end
'' and this is the event raised by the sucessfull
'' connection to the remote host
PUBLIC SUB mySocksSmells_connection(host AS String)
WhatEverName.Accept() '' this is a socket!
'' you can do like this aswell
'' Obj = WhatEverName.Accpet()
'' with an Obj AS Object, let say a public one to
'' be used elsewhere
END
I think you get what you need to continue.
PS: I think you should be using a collection outside
of the class, to insert the entire class in it. So you
will be ready to use as many connection as you want,
by using the Collection[key].socket for example.
And it's more easier with a variant[] because the
index is an integer.
If you need more infos, just ask.
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
More information about the User
mailing list