github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/tcp/stream-send.go (about)

     1  /* For license and copyright information please see the LEGAL file in the code repository */
     2  
     3  package tcp
     4  
     5  import (
     6  	"github.com/GeniusesGroup/libgo/protocol"
     7  	"github.com/GeniusesGroup/libgo/timer"
     8  )
     9  
    10  // send as Send Sequence Space
    11  type send struct {
    12  	writeTimer timer.Timer // write deadline timer
    13  
    14  	una  uint32 // send unacknowledged
    15  	next uint32
    16  	wnd  uint16 // send window
    17  	up   bool   // send urgent pointer
    18  	wl1  uint32 // segment sequence number used for last window update
    19  	wl2  uint32 // segment acknowledgment number used for last window update
    20  	iss  uint32 // initial send sequence number
    21  	// buf    []byte Don't need it, because we don't need to copy buffer between kernel and userpspace
    22  }
    23  
    24  func (s *send) init(timeout protocol.Duration) {
    25  	s.writeTimer.Init(nil)
    26  	s.writeTimer.Start(timeout)
    27  
    28  	// TODO:::
    29  }