[flexcoders] Re: Socket communications in Flex
I actually got it working: Problem with Flex not getting data was ... From Help: Each XML message is a complete XML document, terminated by a zero (0) byte After I added it to my server message to Flex it worked fine. Thanks everyone for help. --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: Firewall? Is the port you're using open? Is the data event firing at all? If so, what's in it? If not, either your server is not serving data like you think it is, or the data can't get to your flex app because there's something in the way. On 16/02/2009, at 3:50 AM, markgoldin_2000 wrote: I was able to create a server socket using VB code. I am sending data from a Flex test application to my server socket but cannot send any data to Flex. Any idea? --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote: As Tracy said, yes. A socket is just a network connection. Your flex XMLSocket doesn't know or care what language the program listening on the other was written in. A socket connection is like a call connected between two telephones - if no-one at either end talks or neither end understands the other nothing much will happen. It's up to you to make conversation by defining how you will pass messages back and forth and how you will process them at either end. On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote: I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
RE: [flexcoders] Re: Socket communications in Flex
Are you sending the magic character that flash interprets as the end of a piece of data coming in on a socket connection? It's been two years since I did this, so I can't remember what that character is, probably either a null or a newline. That's the only special thing I remember doing with a socket server, if you don't do that then it can appear as if it's not working. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markgoldin_2000 Sent: 15 February 2009 16:50 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Socket communications in Flex I was able to create a server socket using VB code. I am sending data from a Flex test application to my server socket but cannot send any data to Flex. Any idea? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Guy Morton g...@... wrote: As Tracy said, yes. A socket is just a network connection. Your flex XMLSocket doesn't know or care what language the program listening on the other was written in. A socket connection is like a call connected between two telephones - if no-one at either end talks or neither end understands the other nothing much will happen. It's up to you to make conversation by defining how you will pass messages back and forth and how you will process them at either end. On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote: I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Guy Morton guy@ wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
Re: [flexcoders] Re: Socket communications in Flex
It's \0 or null character for the XMLSocket class. This limitation doesn't exist when you use the binary sockets.
[flexcoders] Re: Socket communications in Flex
I was able to create a server socket using VB code. I am sending data from a Flex test application to my server socket but cannot send any data to Flex. Any idea? --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: As Tracy said, yes. A socket is just a network connection. Your flex XMLSocket doesn't know or care what language the program listening on the other was written in. A socket connection is like a call connected between two telephones - if no-one at either end talks or neither end understands the other nothing much will happen. It's up to you to make conversation by defining how you will pass messages back and forth and how you will process them at either end. On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote: I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
[flexcoders] Re: Socket communications in Flex
Link is not working for me. --- In flexcoders@yahoogroups.com, Weyert de Boer w...@... wrote: Have a look at: http://www.innerfuse.biz/dropbox/WebDU 2007 Leveraging Apollo Runtime.zip Shows how you can make a socket server in Ruby and talk with a Bluetooth GPS device.
[flexcoders] Re: Socket communications in Flex
Copy and paste (Including the spaces) --- In flexcoders@yahoogroups.com, markgoldin_2000 markgoldin_2...@... wrote: Link is not working for me. --- In flexcoders@yahoogroups.com, Weyert de Boer wdb@ wrote: Have a look at: http://www.innerfuse.biz/dropbox/WebDU 2007 Leveraging Apollo Runtime.zip Shows how you can make a socket server in Ruby and talk with a Bluetooth GPS device.
Re: [flexcoders] Re: Socket communications in Flex
Firewall? Is the port you're using open? Is the data event firing at all? If so, what's in it? If not, either your server is not serving data like you think it is, or the data can't get to your flex app because there's something in the way. On 16/02/2009, at 3:50 AM, markgoldin_2000 wrote: I was able to create a server socket using VB code. I am sending data from a Flex test application to my server socket but cannot send any data to Flex. Any idea? --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: As Tracy said, yes. A socket is just a network connection. Your flex XMLSocket doesn't know or care what language the program listening on the other was written in. A socket connection is like a call connected between two telephones - if no-one at either end talks or neither end understands the other nothing much will happen. It's up to you to make conversation by defining how you will pass messages back and forth and how you will process them at either end. On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote: I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
[flexcoders] Re: Socket communications in Flex
I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
RE: [flexcoders] Re: Socket communications in Flex
Yes. I wrote a socket server in VB.Net that talked to a Flex app. It was years ago but I'll send you the code if you like. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markgoldin_2000 Sent: Saturday, February 14, 2009 11:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Socket communications in Flex I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Guy Morton g...@... wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
[flexcoders] Re: Socket communications in Flex
I would very much appreciate any code sample. --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Yes. I wrote a socket server in VB.Net that talked to a Flex app. It was years ago but I'll send you the code if you like. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markgoldin_2000 Sent: Saturday, February 14, 2009 11:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Socket communications in Flex I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Guy Morton guy@ wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
Re: [flexcoders] Re: Socket communications in Flex
As Tracy said, yes. A socket is just a network connection. Your flex XMLSocket doesn't know or care what language the program listening on the other was written in. A socket connection is like a call connected between two telephones - if no-one at either end talks or neither end understands the other nothing much will happen. It's up to you to make conversation by defining how you will pass messages back and forth and how you will process them at either end. On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote: I am not sure myself about my question :). First, can Flex be listening to a socket that is created within any program? I mean, if a vb program creates a socket using Winsock will Flex be able to listen to such socket? Second, if yes, how would data actually be transfered? Thanks --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: Well...nothing would, normally. You'd have to set up a server to talk to you on that socket, develop a protocol for conversing over the socket, etc. An XML socket is just a pipe to communicate over. Unlike normal http requests which encapsulate the http conversation so you don't see it, a raw XML socket requires you to define what messages are going to be sent by whom and what those messages mean. Does that help, or have I misunderstood your question? Guy On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote: I am trying to understand how socket communications work in flex. This code will connect to a port 8080 on a local computer: var xmlsock:XMLSocket = new XMLSocket(); xmlsock.connect(127.0.0.1, 8080); But what I dont understand is what would be sending data to that port? Thanks
Re: [flexcoders] Re: Socket communications in Flex
Have a look at: http://www.innerfuse.biz/dropbox/WebDU 2007 Leveraging Apollo Runtime.zip Shows how you can make a socket server in Ruby and talk with a Bluetooth GPS device.