Welcome! Log In Create A New Profile

Advanced

WD12 Socket events / Socket help

Posted by Ian 
Ian
WD12 Socket events / Socket help
May 01, 2009 06:57AM
Hi All. I'm from a VB6 / .net background (we can't all be perfect ! ), have purchased WinDev12 and am trying to create a TCP/IP server/client app.
My issue is I don't seem able to 'trap' or obtain the socket status (free, connecting, connected, disconnecting ,disconnected etc...).

In VB (sorry!) I'd use the winsock eventhandler. This would fire each and every time a change in socket status was detected... Is there a way to do this with WinDev please ?

I have worked my way through the manuals / examples but can't get my head around the socket / connection objects..

I hope someone can help a rather frustrated newbie... Thanks.
Piet van Zanten
Re: WD12 Socket events / Socket help
May 01, 2009 09:43AM
Hi,

A complete example can be found in the complete examples section: "Using sockets" .Based on this example I managed to create a client-server app.

Basically Windev uses a procedure with a continuous loop to check the socket status.
This procedure is run as a thread.

Looking at the client window in the example:
The procedure containing the loop is called "Reception".
In the initialization code of WIN_Client the connection is made and at the end the thread is started.

HTH, regards,
Piet
Ian
Re: WD12 Socket events / Socket help
May 01, 2009 11:50AM
Many thanks for that. Much clearer now. Coming from a VB6 background, I had not fully understood :rolleyes: the power / use of 'Threads' within my code... Appreciated.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: