--- In [email protected], Claus Wahlers <[EMAIL PROTECTED]> wrote: > > > > I am trying to create an AIR application that would listen to a port > > on the client's machine and print the messages. > > That's not possible without a (non-Flash) local socket server. AIR > applications can only work as socket clients, but not as socket servers > (they can connect to sockets but can't accept socket connections). > > Cheers, > Claus. > Many thanks for the reply Claus!
Sorry apparently the listener word in the heading is confusing. I am just creating a socket client in flex/air that connects to a local port, reads the data and displays it on the screen. I have another application running locally that is writing messages to that port. So basically, I am creating a local application that is reading from a port and dumping the received data on the screen, thats all. I am definitely missing something as even just this: ----------------------------- <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ [Bindable] private var socket:Socket; public function init():void { socket= new Socket; socket.connect("localhost", 9930); } ]]> </mx:Script> <mx:Label text="{socket.connected}"/> </mx:WindowedApplication> -------------------------------- is generating: Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error. at Monitor/init() at Monitor/___Monitor_WindowedApplication1_creationComplete() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-28157 \EventDispatcher.as:209] at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/set initialized() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() Many Thanks, Aman

