c - how set a final in a buffer putting a 0? -


i'm getting buffer of internet, think go buffer , find last character, have find character '\0'. there no '\0' in buffer.

how set final in buffer putting 0 force buffer behave string?

your question confusing. receiver must typically know sent server. , receiver must ensure receives all (you need similar receivall function) data sent.

after receives all data sent, depends inside data. maybe inside data null terminated string followed integer - job of receiver parse , interpret way.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -