Skip to content
  • Iustin Pop's avatar
    Switch the Luxi interface from Strings to ByteStrings · e821050d
    Iustin Pop authored
    
    
    I'm doing this change for future performance optimisations. Currently
    we use the Luxi interface just as a client, so not in the hot path,
    but when we'll use this as a server interface, we're interested to
    both reduce the space and time consumption of the interface.
    
    We have to simultaneous changes here:
    
    - switch from using socket-related function (sendto, recv, etc.) to
      handle-based functions, since the standard network library doesn't
      work with sockets
    - switch from using Strings for the internal buffer to strict
      ByteStrings; the only downside is that we now have the issue of
      decoding/encoding from binary to UTF-8 strings, a fact which brings
      its own issues into the mix (we have to check for failed decodings,
      etc.); but this is similar to what we'll have to handle on the
      Python side when moving to Python 3.x
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    e821050d