// Server wraps an existing stream connection and puts it in the accept state // for any subsequent handshakes. func Server(conn net.Conn, ctx *Ctx) (*Conn, error) { c, err := newConn(conn, ctx) if err != nil { return nil, err } C.SSL_set_accept_state(c.ssl) return c, nil }
func (self *SSL) SetAcceptState() { C.SSL_set_accept_state(self.SSL) }
func (self *SSL) SetBIO(readbio *BIO, writebio *BIO) { C.SSL_set_bio(self.SSL, (*C.BIO)(unsafe.Pointer(readbio.BIO)), (*C.BIO)(unsafe.Pointer(writebio.BIO))) C.SSL_set_accept_state(self.SSL) }