0 Replies Latest reply on Apr 11, 2011 3:29 AM by asharazeem

    ServerSocket

    asharazeem

      Hi,

       

      I wanted to use my Android as a Server and hence was trying to create a serversocket using the following lines of code.

      It works when I simulate a run on my desktop however when I deploy it on my Mobile it throws the error

       

      Error: Error #2002: Operation attempted on invalid socket

       

      Actually its unable to bind this socket to the address I provided.

       

      Code:

       

      var server:ServerSocket = new ServerSocket();

      server.addEventListener(Event.CONNECT,onConnect);

      server.bind(1234,"127.0.0.1");

      server.listen();

       

       

       

      I tried creating a server socket thereafter using the java code ,it worked but what I really want is to connect my clients to serversocket based out on Flex.

       

      Let me know If you have any suggestions/workaround