Hey bud,
 
Check out the binarysocket class. XMLSocket will always terminate with a
null byte \0 - if you use binarysocket instead you'll be able to send
any characters you want!
 
HTH
Steve
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Michel Scoz
Sent: 23 February 2007 11:53
To: [email protected]
Subject: [flexcoders] Flex Socket + MSN Protocol
 
Hi all...
 
I've been reading and searching the archives about sockets but found
nothing that would "solve" my problem, so i was wondering if anyone
could give me a light =)
 
Currently I'm tryin to connect a Flex Project using Sockets to a MSN
server using MSN Protocol Version 13. 
 
The problem im runnin into is that the protocol always ends with an
"\r\n" to finish a command, pretty much like this:
">>>" stands for send commands
"<<<" stands for received commands
 
>>> VER 1 MSNP13 CVR0\r\n
<<< VER 1 MSNP13 CVR0\r\n
>>> CVR 5 0x0409 winnt 5.1 i386 MSG80BETA 8.0.0566 msmsgs [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> com\r\n
<<< CVR 5 8.0.0566 8.0.0566 8.0.0566 http://msgr.
<http://msgr.dlservice.microsoft.com/download/4/5/b/45beb06f-5a08-4694-a
bd8-d6e706b06b68/Install_Messenger_Beta.exe>
dlservice.microsoft.com/download/4/5/b/45beb06f-5a08-4694-abd8-d6e706b06
b68/Install_Messenger_Beta.exe http://ideas. <http://ideas.live.com/r/n>
live.com\r\n
>>> USR 6 TWN I [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> com\r\n
<<< USR 6 TWN S
lc=1033,id=507,tw=40,fs=1,ru=http%3A%2F%2Fmessenger%2Emsn%2Ecom,ct=10627
64229,kpp=1,kv=5,ver=2.1.0173.1,tpf=43f8a4c8ed940c04e3740be46c4d1619\r\n
 
See? Every command line end with an "\r\n" but I dont know how to
replicate this using Flex.
The Socket class when i send "\r\n" always finishes the send command
givin me and EOF (end of file error) in a window executing the app.
And the XMLSocket commands are always terminated by a zero (0) byte.
 
So, can someone give me some directions on how to do it?
I was able to do it with PHP with ease as I was only sending strings...
how to do it with Flex? Any help ppl?
 
Thanks in advance,
 
Michel.
 

Reply via email to