Final Version

I may convert the memoryStream into a networkStream