Welcome! Log In Create A New Profile

Advanced

Bi-Directional Socket

Posted by HairyHaggis.pcs.crosspost 
HairyHaggis.pcs.crosspost
Bi-Directional Socket
June 08, 2009 10:06AM
Are Sockets bi-directional in WinDev?

All of the examples supplied with WinDev have one socket to send messages, and another socket to receive messages. Is this really necessary, or is it possible to send and receive mesages on the same socket?

Thanks in advance.

Message forwarded from pcsoft.us.windev
Arie
Re: Bi-Directional Socket
June 08, 2009 10:19AM
Yes, sockets are bi-directional. Even between WD and WD-mobile.

Arie
Goof.pcs.crosspost
Re: Bi-Directional Socket
June 08, 2009 05:36PM
HairyHaggis a écrit :
> Are Sockets bi-directional in WinDev?
>
> All of the examples supplied with WinDev have one socket to send messages, and another socket to receive messages. Is this really necessary, or is it possible to send and receive mesages on the same socket?
>
> Thanks in advance.
>
>
Sockets are bi-directional in most programming language (i think even
all of them) that support TCP.
But UDP sockets are uni-directional (they are one way packets).
Windev support client (SocketConnect) and server sockets (SocketCreate)

In some target (Windev Linux for my tests) SocketCreate doesn't work.

Bye
Message forwarded from pcsoft.us.windev
HairyHaggis.pcs.crosspost
Re: Bi-Directional Socket
June 09, 2009 12:48PM
Thank you for your help & assistance.

I have now got the socket on my server listening & sending, with one more little problem.

After I use SocketAccept(), I call SocketChangeTransmissionMode() with SocketNoEndTag. This allows me to read the data sent by my VB6 client.

When I then try to send back to my VB6 client using SocketWrite() all that is received are question marks (ie "???????????"). Why is this happenning?

Any further assistance would be wonderful.

Thanks.

Message forwarded from pcsoft.us.windev
Fabrice Harari.pcs.crosspost
Re: Bi-Directional Socket
June 09, 2009 01:43PM
Hi...

This sounds like a string format problem (utf, ansi, unicode).... one of
the string format transformation functions available should be able to
solve that problem

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on [www.fabriceharari.com]


HairyHaggis wrote:
> Thank you for your help & assistance.
>
> I have now got the socket on my server listening & sending, with one more little problem.
>
> After I use SocketAccept(), I call SocketChangeTransmissionMode() with SocketNoEndTag. This allows me to read the data sent by my VB6 client.
>
> When I then try to send back to my VB6 client using SocketWrite() all that is received are question marks (ie "???????????"). Why is this happenning?
>
> Any further assistance would be wonderful.
>
> Thanks.
>
Message forwarded from pcsoft.us.windev
Goof.pcs.crosspost
Re: Bi-Directional Socket
June 09, 2009 05:49PM
Same answer.

A tool might help.
A network sniffer.
I've tried Wireshark that work very well for me.
You can filter protocols, ip and ports.

Try to send back a string to the WD app to view what the WD app will
receive should help.

A++
Goof

Fabrice Harari a écrit :
> Hi...
>
> This sounds like a string format problem (utf, ansi, unicode).... one of
> the string format transformation functions available should be able to
> solve that problem
>
> Best regards
>
>
Message forwarded from pcsoft.us.windev
HairyHaggis.pcs.crosspost
Re: Bi-Directional Socket
June 10, 2009 05:35PM
Thank you Goof & Fabrice again for all of your help, I eventually got this to work.

:-)

Message forwarded from pcsoft.us.windev
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: