Create a object which looks something like this class ObjectState { public byte[] myReadBuffer = new byte[2048]; public NetworkStream str = set the network stream object u had created } now when you call beginread call it this way ObjectState state = new ObjectState(); networkstream.BeginRead(state.myReadBuffer, 0, 2048, AsyncCallback method pointer, state) //Pass state object to last parameter of BeginRead. when u endread ObjectState state; state = (objectState) result.AsyncState; int numberOfBytesRead = 0; numberOfBytesRead = str.EndRead(result); now use state.myReadBuffer; //This should contain the data u r looking for
K
kiranprabhu
@kiranprabhu