A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Server problems

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Posts
    4

    Server problems

    Hi.

    I understand that this is a frequent question. But I really cant find a soulution to it. I have this working chat, client in flash and a server in VB. The client is using the socket.connet(ip,port) method. If I run the client localy it works fine. But if I try to run it from my Apache webbserver on my computer it wont connect to my chat server.

    Maybe I got it wrong. My apache server and my chat server is running on my local IP. Isnt they in the same subdomain? Or do I have do some configurations with my apache server?

    Im a bit lost, so please help me.

    Andreas, Sweden.

    Increase the peace!

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    What is the IP you tell your Server to run on?

    What is the IP you 'connect' to in Flash?
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

  3. #3
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    I think flash can get confused with your machines name internally (eg myMachine) compared to your IP address. Use IP addresses everywhere (don't use any names) to test your application.
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  4. #4
    Junior Member
    Join Date
    Mar 2003
    Posts
    4
    Thanks for quick replys.

    For starters I shall say that I'm not a wiz on "internet" programing, so please keep it simple. And excuse my poor english.

    VAYKENT >> I tell my server to run on the same IP as I try connect to with Flash.

    tupps >> I dont use any names just hard coded numerical IP's. I only use it once when the client "fires up" and do it in this form - xmlSocket.connect("xxx.xxx.xx.xxx",xxxx). Ill use port 5000 so the port is not problem. Should I use the form connect("http://xxxx.xxx......)? To me it seems like the client cant reache the chat server because the client dosnt recive a onConnect message.

    Andreas

  5. #5
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    It would be wrong to use 'http://' in connecting. Tupps found that to be a problem in someone elses code before.

    Other than that.... I'd want to see the code.
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

  6. #6
    Junior Member
    Join Date
    Mar 2003
    Posts
    4
    Its no fansy stuff. I have this socketStat object that keep some info about the client. It controls when the connect method is used.

    socketStats = new socketInfo(false,false,false);
    mySocket = new XMLSocket();
    mySocket.onXML = myOnXML;
    mySocket.onConnect = myOnConnect;
    mySocket.onClose = myOnClose;
    if(socketStats.connected == false){
    txtInfo.text = "connecting to server");
    mySocket.connect("xxx.xx.xxx.xxx",5000);
    }
    function myOnConnect(success){
    if(success){
    socketStats.connected = true;
    gotoAndStop(2);
    }
    else
    txtInfo.text = "Connection failed";
    }

    That is about all that is involved with the conecting fase. txtInfo displays "connecting......." and stops there. I dont get a "connection faild".

    I'd notice that if I run the site by accessing the site by typing "localhost", instead of my IP, in my browser it works fine.

    Hope that will help.

    THX Andreas

  7. #7
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Your not running a personal firewall by any chance? Have firewall settings turned on in Windows XP network settings?
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  8. #8
    Junior Member
    Join Date
    Mar 2003
    Posts
    4
    As it sometimes happens in the wonderful world of Flash the problem solved itself. Now everything is working fine when Im connecting to my numeric IP. How about that?

    THX for the attention, Andreas.

  9. #9
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    First step in any PC Support problem, reboot the machine. If nothing else someone else might have fixed the problem by the time the person rebooted their machine!
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center