0
I’m in a little trouble,
i use BinaryWriter
to write bytes and then send them as a response
certainly I use it in the right way(I think).
however, when I use it several times, I break point or capture the answers by Wireshark, looking at the answers he is returning to me (Writing)
and it seems that the BinaryWriter
is gathering every time I write and then send the reply.
I’ll give you a basic example of the code of the way I use it:
Response.Write(new byte[] { 0x0F, 0x00, 0x00 }); //chamada da classe é Response
Response.WritePStr(UserInfo.Username); //Escreve String e converte em bytes
SendResponse(); //copia os bytes escritos da PangyaBinaryWriter, usando o Response
Response.Write(new byte[] { 0x01, 0x00, 0xD9, 0xFF, 0xFF, 0xFF, 0xFF });
SendResponse();
if I leave it this way it "seems" to put everything together and send as a response, and sometimes it sends everything separately, but it is difficult to happen.
my problem is this, there is some form of "cut" or "separate" for each answer be individual?
Code is right here:
Also I could not understand very well what you are looking for... but it seems to me to approach the technique of Chunks https://stackoverflow.com/questions/1868279/anyone-have-sample-code-for-doing-a-chunked-http-streaming-downloadof-one-web
– Leandro Angelo
Okay, thank you very much. I’ll look later
– LuisMK