~allard-guy-m/stompngo/trunk

« back to all changes in this revision

Viewing changes to connect.go

  • Committer: Guy M. Allard
  • Date: 2020-02-01 16:37:03 UTC
  • mfrom: (245.1.5)
  • Revision ID: git-v1:c7de0198ea3290cdaa186cdc1c214541b89b480a
Optional tracking of network elapsed times.

* elttrack:
  Protect against nil value.
  Allow override of TCP read/write buffer sizes.
  Add CSV display of elapsed times.
  An experiment with ReadBytes.
  Start elapsed read/write time tracker branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
                        log.Ldate|log.Lmicroseconds|log.Lshortfile))
111
111
        }
112
112
 
 
113
        // Initialize elapsed time tracking data if needed
 
114
        c.eltd = nil
 
115
        if os.Getenv("STOMP_TRACKELT") != "" {
 
116
                c.eltd = &eltmets{}
 
117
        }
 
118
 
113
119
        // OK, put a CONNECT on the wire
114
 
        c.wtr = bufio.NewWriter(n) // Create the writer
115
 
        go c.writer()              // Start it
 
120
        c.wtr = bufio.NewWriterSize(n, senv.WriteBufsz()) // Create the writer
 
121
        // fmt.Println("TCDBG", c.wtr.Size())
 
122
        go c.writer() // Start it
116
123
        var f Frame
117
124
        if senv.UseStomp() {
118
125
                if ch.Value("accept-version") == SPL_11 || ch.Value("accept-version") == SPL_12 {