variables. 
                  
                  
                  How should one decode received packets from tcp with a 1 byte header?
                  
                  
                  Headers are to announce packet length to the receiving end of a tcp connection.
                  
                  
                  But we have 3 types:
                  
                  
                  binary.BigEndian.Uint16
                  
                  
                  binary.BigEndian.Uint32
                  
                  
                  binary.BigEndian.Uint64
                  
                  
                  What if sending node defines the header as uint8, which is 1 byte?
                  
                  
                
how about byte?
BTW, who told you go doesn’t have uint8? https://golang.org/pkg/builtin/#uint8
Обсуждают сегодня