• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

communicate between Server (delphi) and client (flash)

my purpose , write server in delphi  and client in flash

but client cannot receive anything from server.

I don't know how to do it, can anyone show me working code both delphi and flash.
0
lhquang
Asked:
lhquang
  • 2
  • 2
1 Solution
 
2266180Commented:
I never programmed in flash (just displaying and all that) but from what I have read there is the following way to interact with a flash:
- the application is displaying the flash file and it can send/receive data to and from the flash file(if my memory serves me correctly, usinf fscommand or something similar)
I also know that you can do connections between a flash application and a server (for example the flash games sending scores to server), but I believe that this is done via the http protocol. for this case I have found the following: http://www.flash-creations.com/notes/servercomm_loadvars.php
0
 
lhquangAuthor Commented:
thank ciuly , but flash can use socket and connect to every port of server , not only http protocol, I used XMLSocket but client cannot received data from server.
0
 
2266180Commented:
I see. can you give more info on how you did you code it and how do expect it to behave? maybe even some code? I ask this not even thinking that this is a firewall or system  configuration issue, which I hope it's not :)

basically, on the delphi server part you must have a listening socket (a server socket of some kind) and on the flash client part, a client socket of some kind (xmlsocket as I understand) after this is done, you must define a protocol for your communication:
which part send what and when. because if the server waits for the client to send something and the client waits for the server to send something then both are waiting and thus nobody sends anything.
0
 
lhquangAuthor Commented:
thank all, I can do it now
0
 
Eddie ShipmanAll-around developerCommented:
I took the VB.net source code to this article:
http://www.devx.com/dotnet/Article/21033/0

and converted it to Delphi 6. It shows how to communicate between the two.
I don't have the source here with me now but I will look for it when I go home
for lunch in about 3-4 hrs.


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now