1 Reply Latest reply on Jan 17, 2012 5:40 PM by Mhood89

    Client - Server socket in AS3

    Mhood89 Level 1

      hi every body


      i just wana an exiplinantion about socket in AS3

      this a java code for socket communication


      Server Side
      Client Side


      serversocket s  = new ServerSocket("ip",port);

      Socket client;

      while (true)


      client = s.accept();

      DataInptStream d =client.get ...etc

      DataOutptStrm o=client.getoutpt....etc


      write methods


      Socket client=new socket(port);

      Dataoutptstrm SendtoServer=client.getoutpt...







      i asked for an implementation for that , i read about but i couldn't understand how could it be

      also if i have a java listeneer on a port,, could as3 socket connect to that port, i ment does dataoutpt streams in java will work with as3 sockets???

        • 1. Re: Client - Server socket in AS3
          Mhood89 Level 1

          hi again

          in AS3 we cannot build a server but i build a client


          a java server runs above

          and the client in AS3 is :



          var client:socket=new socket();




          function read(e:progressevent):void{

          var t:string=e.readutf();




          function snd(String tt){