You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Handshake performs an SSL handshake. If a handshake is not manually// triggered, it will run before the first I/O on the encrypted stream.func (c*Conn) Handshake() error {
err:=tryAgainforerr==tryAgain {
err=c.handleError(c.handshake())
}
goc.flushOutputBuffer()
returnerr
}
can not understand why need "go c.flushOutputBuffer()"
// Handshake performs an SSL handshake. If a handshake is not manually// triggered, it will run before the first I/O on the encrypted stream.func (c*Conn) Handshake() error {
err:=tryAgainforerr==tryAgain {
err=c.handleError(c.handshake())
}
c.flushOutputBuffer()
returnerr
}
will better?
// Read reads up to len(b) bytes into b. It returns the number of bytes read// and an error if applicable. io.EOF is returned when the caller can expect// to see no more data.func (c*Conn) Read(b []byte) (nint, errerror) {
iflen(b) ==0 {
return0, nil
}
err=tryAgainforerr==tryAgain {
n, errcb:=c.read(b)
err=c.handleError(errcb)
iferr==nil {
goc.flushOutputBuffer()
returnn, nil
}
iferr==io.ErrUnexpectedEOF {
err=io.EOF
}
}
return0, err
}
The text was updated successfully, but these errors were encountered:
can not understand why need "go c.flushOutputBuffer()"
will better?
The text was updated successfully, but these errors were encountered: