Isn't there a way to just send your own pre-built binary stream and
have it received and deserialized manually in your classes?

On 11/17/07, Yahn Bernier <[EMAIL PROTECTED]> wrote:
> We haven't added this to the server side since the preferred method is
> to network the internal string (or better yet, an index, etc.) and use
> it as a look up (vgui::localize()->Find) in the xxx_language.txt files
> since each connected client can be using a different language.
>
> Yahn
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Saturday, November 17, 2007 10:41 AM
> To: [email protected]
> Subject: Re: [hlcoders] SendProxy_String_tToString can't send wide-char
> string data
>
> Unfortunately using the array of items is not possible here.  As noted
> on http://developer.valvesoftware.com/wiki/Networking_Entities a single
> array of X items count X times towards the 1024 limit on the number of
> variables associated with a single entity.  So if you wanted to send a
> manual array string of size 1025, it won't work.
>
> As far as base-128 goes - if you look at the code snippet I pasted
> previously you may notice I cheated slightly because I'm sending data in
> groups of 16bits, so I lose very few permutations.  So actually it's not
> really base-128, but base-128 would be the simplest way to explain it.
>
> Oh well, it's possible to work around in client-code, but it's
> surprising with all the internationalization garbage in the SDK that
> they don't support this.
>
>
> At 2007/11/12 05:14 PM, OvermindDL1 wrote:
> >Well since no one else seemed to bother looking (and I actually got
> >some time to look), the only thing the above function does is just
> >fill in the passed in variant setting it as a string.  Looking at the
> >varient it supports an array of a base type (such as wchar/Int16, like
> >you would use).  Will have to do the serialization manually (but that
> >will be what... less then 10 lines of code for what you are doing,
> >just put it into your own function to encapsulate it), but if the
> >array in the variant works (I do not see many places it is used) then
> >it would be perfect.  Honostly though, SendProxy_String_tToString
> >seems like a rather weird function to use, I only see it defined in
> >one place and only used in that class's prop definition.
> >
> >Still that is a hack, it seems like it would be far *far* better to
> >juse serialize it fully and hand it off manually (as a binary stream,
> >usual term being a binary blob) instead of using a variant, that way
> >you could set up string compression, string tables, etc... etc... for
> >effective and easy network bandwidth reduction.  There would be no
> >sendblob function as you just give it a char array with a length to
> >let it send across the network.  Also, you should not need a base-128
> >converter, but rather a base-255 converter would be best if you wanted
> >to continue doing it your method.
> >
> >
> >On 11/11/07, [EMAIL PROTECTED]
> ><[EMAIL PROTECTED]> wrote:
> >> Well there is no SendBlob sort of function anywhere in the dt_send
> and various other networking files.  It's not a huge deal, I just had to
> write my own base-128 encoder, so that there wouldn't be any 0s in the
> data that went over the wire.  It just seems that Valve would want to
> support this natively.
> >>
> >> At 2007/11/10 10:53 PM, OvermindDL1 wrote:
> >> >Could just send it as a binary blob and not as a string (pretend it
> is
> >> >opaque binary data, and not a string, use binary functions, not
> string
> >> >functions).
> >> >
> >> >On 11/10/07, [EMAIL PROTECTED]
> >> ><[EMAIL PROTECTED]> wrote:
> >> >> Well it would be nice if there were a version of string networking
> that was binary-safe.
> >> >>
> >> >> At 2006/09/03 08:33 PM, Aaron Schiff wrote:
> >> >> >--
> >> >> >[ Picked text/plain from multipart/alternative ]
> >> >> >You could use a networked string table as well as the index of
> the string in
> >> >> >the entity network table.  Then you can specify the string length
> in
> >> >> >AddString for the user data.
> >> >> >
> >> >> >On 9/3/06, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> >> >> >wrote:
> >> >> >>
> >> >> >> I thought there was a forum or mailing list thread on this once
> before but
> >> >> >> I can't find it.  Basically it seems that the close-source side
> of the
> >> >> >> networking does a 0x00-truncated data copy.  So you can't send
> strings along
> >> >> >> the wire that contain a 0x00 byte in them, such as wide-char
> strings etc.
> >> >> >>
> >> >> >> Anyone know of a work-around?  (Short of encoding the base64ing
> the
> >> >> >> strings or something like that.)
> >> >> >>
> >> >> >> _______________________________________________
> >> >> >> To unsubscribe, edit your list preferences, or view the list
> archives,
> >> >> >> please visit:
> >> >> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >--
> >> >> >ts2do
> >> >> >--
> >> >> >
> >> >> >_______________________________________________
> >> >> >To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> >> >> >http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >> >>
> >> >> _______________________________________________
> >> >> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> >> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >> >>
> >> >>
> >> >
> >> >_______________________________________________
> >> >To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> >> >http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >> _______________________________________________
> >> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >
> >_______________________________________________
> >To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> >http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to