I tried to create an application using a Socket instantiated in code:

[CODE]
PRIVATE MySock AS Socket

PUBLIC SUB Form_Open()
  
  MySock = NEW Socket

END
[/CODE]

I also tried:

[CODE]
PRIVATE MySock AS NEW Socket
[/CODE]

I had endless trouble getting the Socket to work so I created a new
project from the ClientSocket (0.0.56) sample included in 2.8. I first
tested the sample app, which worked fine. I then deleted the Socket
control from the sample and added the code as shown above.

Lo and behold, the Socket, when instantiated in code, will not connect
to anything. It just sits there "looking up hostname".

I need to be able to use a Socket in a class module, but it seems the
Socket doesn't want to work if it is instantiated in code. It works fine
if the Socket is added to a form, but this is no good for what I need to
achieve.

Am I doing something wrong or could this be a bug in Socket?

Any help is appreciated.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to