aboutsummaryrefslogtreecommitdiff
path: root/network.go
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2019-06-30 17:03:51 -0400
committerDeterminant <ted.sybil@gmail.com>2019-06-30 17:03:51 -0400
commitd247c437f396709f62eadaf863b8a552d7142fc7 (patch)
treef33fe8b123874d303ea95d57a164ea6000a7b6dd /network.go
parentf3c624b8a1577a7b3f8efb408421450b5d23a7e5 (diff)
fix NetAddrArray bug; add new example
Diffstat (limited to 'network.go')
-rw-r--r--network.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/network.go b/network.go
index 6e0d8c6..22e0c31 100644
--- a/network.go
+++ b/network.go
@@ -59,6 +59,11 @@ func (self MsgNetworkConn) GetAddr() NetAddr {
return NetAddrFromC(C.msgnetwork_conn_get_addr(self.inner))
}
+// Check if the connection has been terminated.
+func (self MsgNetworkConn) IsTerminated() bool {
+ return bool(C.msgnetwork_conn_is_terminated(self.inner))
+}
+
// Get the certificate of the remote end of this connection. Use Copy() to make a
// copy of the certificate if you want to use the certificate object beyond the
// lifetime of the connection.