Sobecausewe'refindingthattheonlywaythatwecanfinallygetourfullmessageistoissue a closewhichclosesthesocketandendstheclientsowe'd havetoreruntheclient, I saydoesn't work.
So I'm surelotsofpeoplearegonnaleaveusbehindmelike I'vegoteverything I need.
Butyouprobablydon't becauseit's gonnaget a lotmorecomplicatedthanthis, andoryou'regonnabemissingouton a tonofstuffthatsocketshavetoofferyou, um, withbasicallyanytimeyouwanttosendthingsbiggerthanyourbuffersize s o mostofthesockettutorialsthat I'veeverseenDon't eventalkabouthowyoubuildthemessage.
Theyit's usuallygetChadexample.
Theyuse a bufferof, like 2048 bites, andtheydon't talkaboutwhathappenswhenyouexceedthat.
Soanyways, notgonnadothattoyouguys.
Sohowdoweactuallydoit?
Howdoyouhandlesocketsthatexceedyourbuffer?
Butyoudon't wanttohavetoclosethisconnection.
Youwanttokeep a streamopenandallthatgenerally, whatyou'regonnadoisuse a header.
Now, there's a 1,000,000 waysthatwecoulddosomethingwith a headertoolin.
Basically, a headerisgonnanotifyyourprogramHowlongisyourmessageandmaybegivesomeotherinformationaboutyourmessage.
Soyoucanunderstandthateventuallyyouyoucouldcomeupwith a numberandit's notgonnalike, youknow, require a hugelikeyourbufferwillalwaysbemorethanenoughtohandleyourheadersize.
Well, I guess I can't sayalways, butitshouldbeOkay, Great.