User Tag List

Results 1 to 5 of 5

Thread: creating a tcp server

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating a tcp server

    Hi, is it possible to create a simple TCP server with mmf2 dev? I'm currently trying to use moosock to do this job. It does start a server at the port I selected and clients can see and connect to it. They can enev send their messages that are correctly received. However, I am unable to send simple text messages from this server to the clients. I'm using the "send text" and "send text line" actions without success...

    Are there alternatives? Something like a C# script for the .net object?

    The file "im working on is here.

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating a tcp server

    You must be doing something wrong in the client, connecting with telnet works.

    Here's how I tested it:
    With the server running:
    Press start, (on xp then press run) and type "cmd" and press enter
    type "telnet localhost 8000" and press enter
    type anything to send it to the server
    push the button in your server to see "<valor>mmf</valor>" in the telnet window.

    EDIT: Ah! Seems the client has to have sent something to the server for it to know who to send back to. To send to everyone you'll need to use a loop for "CountSockets( "MooSock" )" times and the "select socket" action to choose who to send back to one by one.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating a tcp server

    Hi, I did not get it... Let me explain what I'm doing:

    1. Start the server at por 8000.
    2. Make the connection (a flash client) - ok.
    3. Send a message from the flash client - ok, the server receives it.

    Now, with your suggestion:

    4. When I want to send a message I start a fastloop "CountSockets("MooSock")" times.
    5. On the loop at the server object I select socket "loop index" and then send the text line "<valor>from mmf</valor>".

    This isn't working... Well, the flash can send messages to mmf at any time, but this message return does not happen.

    The updated file is here.

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating a tcp server

    Then the problem is in the flash file.

    EDIT: Evidence that the server works:


    EDIT2: a good test for tcp clients is connecting to a webserver (e.g. www.google.com) on port 80 and sending "GET /"+newline+newline and see what happens.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating a tcp server

    You were right. I misused some flash classes. I'll fix things up and will post an example of flash/mmf communication using this soon.

    Thank you a lot!

Similar Threads

  1. SQL Server bug
    By Phi in forum Extension Development
    Replies: 0
    Last Post: 8th January 2013, 11:23 AM
  2. Creating Lacewing Server Help!
    By devripper in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th April 2012, 12:34 AM
  3. Server bug
    By James in forum Lacewing
    Replies: 5
    Last Post: 7th September 2009, 03:41 AM
  4. Creating a Server in MMF2
    By Asholay in forum Lacewing
    Replies: 15
    Last Post: 5th July 2009, 08:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •