Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 9 Jahren, 1 Monat
Beteiligte Autoren:
Robin Lane.pcs.crosspost

Using Sockets with .NET Client

Startbeitrag von Robin Lane.pcs.crosspost am 25.05.2009 10:03

Hello All,

I am having great difficulty with trying to get Sockets to work with a .NET client. I have no problems with my WinDev server communicating with a WinDev client, nor a .NET server with a .NET client. I can even get a WinDev client to send messages to a .NET server.

What I cannot achieve is for my WinDev server to receive messages sent from a .NET client.

I do know that the .NET client is making a connection via the Socket because I can access SocketClientInfo and get the .NET client’s IP address, but all my attempts to get something from SocketRead fail.

Without producing all my code below on my WinDev server I first use CreateSocket, then SocketAccept and then use SocketRead. This works fine when the client is another WinDev application. My .NET client code is shown below:

First create the socket:

Socket m_socWorker = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);

Send data via:

byte[] byData = System.Text.Encoding.ASCII.GetBytes(txtData.Text.ToString ());
m_socWorker.Send (byData);

On the WinDev server I have tried altering the SocketChangeTransmissionMode to SocketNoEndTag, and have also played with changing the .NET encoding type to UTF8 & Unicode, but still the WinDev server does not receive any data.

Can anybody assist me with this?

(I am currently using version 12, but will be updating in the next week or so.)

Many thanks


Message forwarded from pcsoft.us.windev


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.