network: Implement isConnected to determine whether a connection socket is connected or not
This commit is contained in:
@@ -251,6 +251,10 @@ pub const Host = struct {
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
pub fn isConnected(_: *Host, socket: *ConnSocket) bool {
|
||||
return socket.peer_conn != null;
|
||||
}
|
||||
};
|
||||
|
||||
gpa: Allocator,
|
||||
|
||||
Reference in New Issue
Block a user