github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/tcp/socket-send.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package tcp
     4  
     5  // Send Sequence Space
     6  //
     7  //                    1         2          3          4
     8  //               ----------|----------|----------|----------
     9  //                      SND.UNA    SND.NXT    SND.UNA
    10  //                                           +SND.WND
    11  //
    12  //         1 - old sequence numbers which have been acknowledged
    13  //         2 - sequence numbers of unacknowledged data
    14  //         3 - sequence numbers allowed for new data transmission
    15  //         4 - future sequence numbers which are not yet allowed
    16  type sendSequenceSpace struct {
    17  	una  uint32 // send unacknowledged
    18  	next uint32
    19  	wnd  uint16 // send window
    20  	up   bool   // send urgent pointer
    21  	wl1  uint32 // segment sequence number used for last window update
    22  	wl2  uint32 // segment acknowledgment number used for last window update
    23  	iss  uint32 // initial send sequence number
    24  	// buf    []byte Don't need it, because we don't need to copy buffer between kernel and userpspace
    25  }
    26  
    27  func (s *sendSequenceSpace) init() {
    28  	// TODO:::
    29  }