# XMLSocket won't recieve the data

**URL:** <https://forum.kirupa.com/t/xmlsocket-wont-recieve-the-data/301813>\
**Category:** Uncategorized\
**Created:** [December 16, 2009, 7:01am UTC](https://forum.kirupa.com/t/xmlsocket-wont-recieve-the-data/301813 "2009-12-16T07:01:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wonsong82](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@wonsong82](https://forum.kirupa.com/u/wonsong82)\
**Post date:** [December 16, 2009, 7:01am UTC](https://forum.kirupa.com/t/xmlsocket-wont-recieve-the-data/301813/1 "2009-12-16T07:01:52Z")

</div>

hi. this is wierd.

```auto

// action script
var socket:XMLSocket = new XMLSocket("127.0.0.1",8888);
socket.addEventListener(Event.CONNECT, connected);
socket.addEventListener(DataEvent.DATA, transData);

function connected(e:Event):void
{
	
}

function transData(e:DataEvent):void
{
        trace ("data transmitted...");
        trace (e.data);
}

```

```auto

//c#
TcpListener server = new TcpListener(ip, port);
server.Start();
while (true)
{
        TcpClient client = server.AcceptTcpClient();
        NetworkStream stream = client.getStream();
        Byte[] buffer = Encoding.UTF8.GetBytes("this string won't be sent");
        stream.Write(buffer, 0, buffer.Length);
        stream.Flush();
}

```

this won’t send the string “this string won’t be sent” to the client(flash).  
does anyone know why?
