# Strange socket behavior..?

**URL:** <https://forum.kirupa.com/t/strange-socket-behavior/304437>\
**Category:** flash\
**Created:** [February 8, 2010, 1:27am UTC](https://forum.kirupa.com/t/strange-socket-behavior/304437 "2010-02-08T01:27:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexWD](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@AlexWD](https://forum.kirupa.com/u/AlexWD)\
**Post date:** [February 8, 2010, 1:27am UTC](https://forum.kirupa.com/t/strange-socket-behavior/304437/1 "2010-02-08T01:27:23Z")

</div>

I’m going to try to keep this short while still providing enough information.

I’m creating an application utilizing sockets, one of the features is basic chat. I realized that for some strange reason certain strings were producing strange results.

For example if I entered ‘Something weird’, only ‘S’ would appear. So did some debugging and got some strange results. I traced out _socket.bytesAvailable_ just before reading from the socket and would get a certain number. Then after reading everything from the socket, when checking the length of the string read from it, I would get a different number?

How is this possible? Anyone have any ideas?
