Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 8 Jahren, 3 Monaten
Letzter Beitrag:
vor 8 Jahren, 3 Monaten
Beteiligte Autoren:
HairyHaggis.pcs.crosspost, Goof.pcs.crosspost, Fabrice Harari.pcs.crosspost, Arie

Bi-Directional Socket

Startbeitrag von HairyHaggis.pcs.crosspost am 08.06.2009 08:06

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

Antworten:

Yes, sockets are bi-directional. Even between WD and WD-mobile.

Arie

von Arie - am 08.06.2009 08:19
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

von Goof.pcs.crosspost - am 08.06.2009 15:36

Re: Bi-Directional Socket

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

von HairyHaggis.pcs.crosspost - am 09.06.2009 10:48
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 http://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

von Fabrice Harari.pcs.crosspost - am 09.06.2009 11:43
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

von Goof.pcs.crosspost - am 09.06.2009 15:49
Thank you Goof & Fabrice again for all of your help, I eventually got this to work.

:-)

Message forwarded from pcsoft.us.windev

von HairyHaggis.pcs.crosspost - am 10.06.2009 15:35
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.