Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 7 Jahren, 9 Monaten
Letzter Beitrag:
vor 7 Jahren, 9 Monaten
Beteiligte Autoren:
Tony Turner.pcs.crosspost, Arie, Paulo Oliveira

TCP Sock Windev 15 Mobile to Windev 15

Startbeitrag von Tony Turner.pcs.crosspost am 23.07.2010 05:40


Hi

I have been using UDP sockets for ages and am writing my first TCP Windev 15 Mobile (client) >> Windev 15 (Server) Apps.

The Windev Mobile client app runs on an HTC Mobile with Windows Mobile 5.22

When I send HELLO from Windev Mobile (from the phone app)
I only see the letter H from trace(sMessage) from Windev Server App

I can see the full message via wireshark as:-

10
H.E.L.L.O.

Not sure where all the dots come from...

I must have set something wrong, but been trying all day to get the whole HELLO string rather than just the H.

If I try in the Windev Mobile simulator I get it fine on the trace(sMessage) from the Server:-

HELLO

Any ideas, no doubt I am doing something very wrong but I can't give up as very excited about TCP sockets as I have writen loads of stuff using UDP....

Many Thanks

Tony Turner





Message forwarded from pcsoft.us.windev

Antworten:


Hi

OK i am getting closer but this makes no sense what so ever.

Here is the "ManageMessage" Procedure from Windev 14 example WD Using Sockets. Trying v14 have already tried v15) It receives all messages and sends them to all connected mobile clients. I have added to this
Info(sMessage) to the procedure to see the message on the PC.

PROCEDURE ManageMessage(sEmit,sMessage)

CriticalSectionStart("Management")

sSocketName is string

// Send the message to all connected users
FOR ALL ROW OF Table1

// Retrieve the name of the socket
sSocketName = Socket

// Check the existence of this socket
IF SocketExist(sSocketName) THEN
// Send the message
SocketWrite(sSocketName,sMessage)
Info(sMessage) // **** Added to see the message on PC
END
END

Now when I send from the HTC Mobile running Windows ce 6.5 via GPRS or Wireless, it goes to the Windev Server PC and comes back to the mobile, and on the Mobile I see HELLO or what ever I have typed.

On the PC I see the info box with H, I have tried trace(sMessage), change transmision mode...

If I try Windev Mobile Simulator I see HELLO in the Info(sMessage) as you would expect on the PC.

So it's only when it comes from the Mobile device.

I have tried everything for a day.....

Any ideas.

Thanks

Tony Turner



Message forwarded from pcsoft.us.windev

von Tony Turner.pcs.crosspost - am 23.07.2010 08:42
it looks like some UNICODE problem.

von Paulo Oliveira - am 23.07.2010 08:52
Have a look at UnicodeToAnsi - you need that at the serverside

von Arie - am 23.07.2010 09:22
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.