本文整理匯總了Golang中C.BIO.flags方法的典型用法代碼示例。如果您正苦於以下問題:Golang BIO.flags方法的具體用法?Golang BIO.flags怎麽用?Golang BIO.flags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類C.BIO
的用法示例。
在下文中一共展示了BIO.flags方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: cbioNew
//export cbioNew
func cbioNew(b *C.BIO) C.int {
b.shutdown = 1
b.init = 1
b.num = -1
b.ptr = nil
b.flags = 0
return 1
}
示例2: go_conn_bio_new
//export go_conn_bio_new
func go_conn_bio_new(bio *C.BIO) C.int {
//we are initializing here
bio.init = C.int(1)
//see mem_new()
bio.num = C.int(-1)
bio.ptr = nil
bio.flags = C.BIO_FLAGS_READ | C.BIO_FLAGS_WRITE
return C.int(1)
}
示例3: go_conn_bio_free
//export go_conn_bio_free
func go_conn_bio_free(bio *C.BIO) C.int {
var conn *Conn = (*Conn)(bio.ptr)
conn.conn.Close()
if C.int(bio.shutdown) != 0 {
bio.ptr = nil
bio.flags = 0
bio.init = 0
}
return C.int(1)
}
示例4: bioSetRetryRead
func bioSetRetryRead(b *C.BIO) {
// from BIO_set_retry_read and BIO_set_flags
b.flags |= (C.BIO_FLAGS_READ | C.BIO_FLAGS_SHOULD_RETRY)
}
示例5: bioClearRetryFlags
func bioClearRetryFlags(b *C.BIO) {
// from BIO_clear_retry_flags and BIO_clear_flags
b.flags &= ^(C.BIO_FLAGS_RWS | C.BIO_FLAGS_SHOULD_RETRY)
}